Recent Posts

Pages: [1] 2 3 ... 10
1
Problems & Solutions / Re: Equivalent of PB Kill statement
« Last post by Aurel on April 25, 2018, 11:21:42 AM »
There are winapi functions - copyfile,deletefile etc ..
you must search for them ,they are easy..
2
Problems & Solutions / Equivalent of PB Kill statement
« Last post by chrisc on April 25, 2018, 11:08:54 AM »
In PB we can erase a file using the Kill statement

http://www.manmrk.net/tutorials/basic/PowerBASIC/pbcc/kill_statement.htm

what is the equivalent statement  in O2 , i can't find this statement inside oxygen_help.chm file
3
Problems & Solutions / Re: do we need a similar function to PB FREEFILE?
« Last post by chrisc on April 25, 2018, 11:03:14 AM »
Thanxx a lot Charles

O2 is much better than the PB  FREEFILE and other file functions as it involves more code lines to read a file

in your program above, i notice that you can read the entire file into a buffer string s

then what would be the maximum file size that can be read into this string s ?   

is this process called a Binary file read ?
4
Problems & Solutions / Equivalent of PB Reset statement
« Last post by chrisc on April 25, 2018, 10:56:09 AM »
In PB  the RESET statement is to clear off the memory of strings, numeric variables and arrays

http://www.manmrk.net/tutorials/basic/PowerBASIC/pbcc6/reset_statement.html

what is the equivalent in O2 ?   

But O2  del  command only clear off strings and bstrings  but not for
numeric variables and arrays

so del may not be equivalent to PB's  RESET  ?    is this right?
5
Problems & Solutions / Re: Equivalent of PB Filecopy command
« Last post by chrisc on April 25, 2018, 10:48:15 AM »
Thanxx Jose
6
General / Re: Question about ChildWin.o2bas
« Last post by Charles Pegge on April 25, 2018, 10:35:57 AM »
Not ready to release yet. The source code produces o2g1.exe which then produces o2g2.exe. This is my test configuration for O2 over 3 generations, so to speak.
7
Problems & Solutions / Re: do we need a similar function to PB FREEFILE?
« Last post by Charles Pegge on April 25, 2018, 10:24:32 AM »
If you are using whole files then we have GetFile and PutFile which do not require handles. Otherwise, a sys variable is used as a file handle:

Code: [Select]
use corewin
string s
sys e,f
'EQUIVALENT TO: S=GETFILE "T.TXT"
f=fopen "t.txt","r" 'open for reading
print f             'file handle or null
fseek f,0,2         'end of file
e=ftell f           'get position
print e             'length of file
fseek f,0,0         'beginning of file
s=nuls e            'create buffer to fit
fread s,1,e,f       'load buffer
fclose f            'close file
8
General / Re: Question about ChildWin.o2bas
« Last post by John on April 25, 2018, 10:14:50 AM »
Hi Roland,

Thanks for spotting those. I've fixed the dot-coding and posted an update.

I've also included the source files for self-compiling, which is rolling along nicely. These are stored in inc/o2, and I will endeavour to expose manageable pieces of code and make them available for other programs to use. Some of the obvious ones are HashStore, Lexer, MacroEngine, MetaLanguage and Assembler.

https://github.com/Charles-Pegge/OxygenBasic/blob/master/OxygenProgress.zip

This deserves a mention in the O2 announcements section of the forum.

Curious, are you getting any sleep Charles?
9
General / Re: Question about ChildWin.o2bas
« Last post by Aurel on April 25, 2018, 08:13:20 AM »
I've also included the source files for self-compiling, which is rolling along nicely.

WOW ...  :)  NICE !
Charles ...is that first release?
10
Problems & Solutions / do we need a similar function to PB FREEFILE?
« Last post by chrisc on April 25, 2018, 08:08:58 AM »
In PB there is a FREEFILE function which gets the next available file number or channel
before we can open a new file

http://manmrk.net/tutorials/basic/PowerBASIC/pbcc/freefile_function.htm

which i think is not needed in O2.   am i correct?

Pages: [1] 2 3 ... 10