Oxygen Basic

Information => Open Forum => Topic started by: Haim on January 28, 2013, 05:59:34 AM

Title: Learning to program with Oxygen Basic
Post by: Haim on January 28, 2013, 05:59:34 AM
Hello,
Can anyone refer me to some beginners material/tutorial which can help me understand the basics of Oxygen basic?
Thanks,

Haim
Title: Re: Learning to program with Oxygen Basic
Post by: Peter on January 28, 2013, 07:09:15 AM
Hi,

do you mean something like this?

X
Title: Re: Learning to program with Oxygen Basic
Post by: Aurel on January 28, 2013, 07:21:06 AM
Unfortunatelly still there is no real help or programming user guide...but
after you download complete pack.
U can use Scite editor and check examples.
1.Compile
2.Build
3.run

or you can use OxyEdit editor created by me,or Notepad etc...
Title: Re: Learning to program with Oxygen Basic
Post by: Peter on January 28, 2013, 07:50:02 AM
Aurel,

I would take your Editor, but there is an annoying thing with this NULL at the end.
 
Title: Re: Learning to program with Oxygen Basic
Post by: Aurel on January 28, 2013, 09:42:26 AM
YES..you right and i made mistake with LEN of file.
Ok i will fix this and update OxyEdit.
Infact i fix this but i forget to upload editor here... ::)
Title: Re: Learning to program with Oxygen Basic
Post by: Peter on January 28, 2013, 10:02:19 AM
Okay,
Do you like mushrooms?

X
Title: Re: Learning to program with Oxygen Basic
Post by: Aurel on January 28, 2013, 10:19:39 AM
Not to much, hmm but maybe i like crazy ones.. :D

Ok .i fix OxyEdit now so you can try again.
Infact i work on Oxygen Basic version with new toolbar
and i can only tell you that work 5 times faster then current written in Ebasic. ;) 
Title: Re: Learning to program with Oxygen Basic
Post by: Haim on January 28, 2013, 09:27:55 PM

Thank you guys for your responses.
I'll take the advice and study the code samples.
Haim
Title: Re: Learning to program with Oxygen Basic
Post by: kwibus on April 27, 2016, 02:47:47 AM
Hello,

I use the Scite editor to Compile, Build and Run a o2bas file, but get a messagebox. What should I do? Is it caused by the folder or subfolder where Scite is placed?

Thank you,
Ad(http://)

.
Title: Re: Learning to program with Oxygen Basic
Post by: Peter on April 27, 2016, 09:06:59 AM
Quote
I use the Scite editor to Compile, Build and Run a o2bas file, but get a messagebox. What should I do? Is it caused by the folder or subfolder where Scite is placed?

hello kwibus,

welcome to the OxygenBasic forum.

There is nothing wrong, I could it start from the folder.

Just click on GO

.
Title: Re: Learning to program with Oxygen Basic
Post by: kwibus on April 27, 2016, 10:24:12 AM
Hello Peter,

Thanks for your reply; but it does not work. I get the error 3: it can not find the file?
However, the Oxide.exe does work. Only thing that annoys me a bit is the font used; it is so big!



.
Title: Re: Learning to program with Oxygen Basic
Post by: Peter on April 27, 2016, 12:18:38 PM
Hi kwibus,

do not use this ide, is a half work.
use scite!

link all o2bas with scite.
click then on a oxygenbasic souce code. That is what I do.
Title: Re: Learning to program with Oxygen Basic
Post by: kwibus on April 27, 2016, 01:01:47 PM
Hi Peter,

Unfortunately, the result is still the same. Where have you placed your SciTE directory? I have mine under the rout C:\; maybe not as it should be?

.
Title: Re: Learning to program with Oxygen Basic
Post by: Peter on April 27, 2016, 02:08:33 PM
Hi kwibus,

I have oxygenbasic  on my drive:  "D: / OxygenBasic"

Try to open a source code with " File" and then "Open" or press Ctrl O
Title: Re: Learning to program with Oxygen Basic
Post by: kwibus on April 27, 2016, 02:44:55 PM
Hi Peter,

Opening is not the problem. I have the file hello.o2bas opened in the SciTE editor.
Then I press F5, or "Go", and the messagebox appears, saying the file can't be found. That's it.

Quite strange, frustrating!

.
Title: Re: Learning to program with Oxygen Basic
Post by: Arnold on May 02, 2016, 03:42:44 PM
Hi kwibus,

I assume SciTe.exe is located in c:\OxygenBasic and there is a file Oxygen.properties in c:\OxygenBasic\ide. Then these modifications should be done in Oxygen.properties:

##
# OXYGEN TOOLS
#
# COMPILE
basco=$(SciteDefaultHome)\gxo2  -c "$(FileNameExt)"
#
# BUILD
basbo=$(SciteDefaultHome)\co2  -a -c -m "$(FileNameExt)"

# RUN FROM SOURCE
basgo=$(SciteDefaultHome)\gxo2 "$(FilePath)"
#
# CONTEXT HELP
basho=hh.exe "$(SciteDefaultHome)\inf\oxygen_help.chm::/wordlink.htm#$(CurrentWord)"
#

For build I use co2 because -a and -i are disabled with gxo2.exe
The difference is removing the quotes from the first argument of COMPILE, BUILD, RUN.


Roland


.
Title: Re: Learning to program with Oxygen Basic
Post by: kwibus on May 03, 2016, 08:37:09 AM
Hi Roland,

Thank you; this answer is exactly what I needed!  :)

I did not have any idea that SciTe.exe has to be placed in the c:\OxygenBasic directory.

And the tip about removing the quotes in the Oxygen.properties file, that is most usefull. This gets the "Tools" working!  ::)

One question though: An .exe, compiled with F7, still needs the oxygen.dll in the same folder. There are also options to compile exe files that do not need the dll, is'nt it? But not in the current SciTe IDE?

Ad
Title: Re: Learning to program with Oxygen Basic
Post by: Arnold on May 03, 2016, 10:06:26 AM
Hi Ad,

I think it does not matter which path is used for OxygenBasic. Important is to respect the structure:
\OxygenBasic
   SciTe.exe
   SciTEGlobal.properties
   ...
   \ide
     Oxygen.properties
    ...

The options in SciTE / Tools are:

F5 Go - This compiles a program.o2bas in memory and starts it by using Oxygen.dll. It is just like using an interpreter.

Ctrl+F7 Compile - This compiles a program.o2bas to an exe file which is dependant of Oxygen.dll. The path is indicated in an oxygen.cfg file. For example in folder examples\DynamicCompile there should be an oxygen.cfg. The path of Oxygen.dll can be specified relative or absolute. If oxygen.cfg is missing or it indicates the wrong path there will be an error message. Thus oxygen.cfg must be created manually in the corresponding folder.

Charles has also provided the possibility to create independant executables. To achieve this the include statement must be used in the .o2bas file:

$ filename "Progname.exe"

#include "$/inc/RTL32.inc"
'#include "$/inc/RTL64.inc" 'for 64 bit exe

Creating 32 bit executables works very fine with me. And creating 64 bit exe seem to work often also. (not always)

To create independant executables I also use F5 - Go in ScTE.

SciTE does not start an exe file automatically. (or I have missed this option). So I change to the folder and start it.

F7 Build - Creates an assembly listing in a separate window. This is interesting for experts. Unfortunately I have not yet reached this stage.

Roland
Title: Re: Learning to program with Oxygen Basic
Post by: Arnold on May 03, 2016, 11:39:03 AM
I forgot to mention that it should also be sufficient to add the path of OxygenBasic to the path environment. Then an extra oxygen.cfg in a folder should not be necessary to run an exe file which is dependant of Oxygen.dll. As I sometimes try out different versions of OxygenBasic in different directories I do not use this option.