• Welcome to Powerbasic Museum 2020-B.
 

News:

Forum in repository mode. No new members allowed.

Main Menu

GPF if we use STRING( somenumber, "0")

Started by Chris Chancellor, December 19, 2018, 07:10:43 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Chris Chancellor

Hello Charles

i found this problem when running a program, the code is as below
there is no problem during compilation


' StTest.o2bas
'  Testing of the STRING function or macro
$filename "StTest.exe"
uses rtl64

string st,  mt , ut
Long  stLen


st="  How are   you   today            "
stLen = LEN(st)

mt = STRING( LEN(st) , "0")
print  " mt  " + mt

print "  stLen  "  stLen

' this will GPF
ut = STRING( stLen, "0")
print  " ut  " + ut




when we use
mt = STRING( LEN(st) , "0")

then there is no problem


but when we use
stLen = LEN(st)
ut = STRING( stLen, "0")


then the program will GPF !

maybe some macro problem ?






Chris Chancellor

Thanxx Brian

yup it's  the same problem with STRING() 
looks like we need to wait for Charles latest progress zip on this.

to bypass this problem we have to use


mt = STRING( LEN(st) , "0")

Charles Pegge

Hi Chris,

This string(..) problem does not occur with the current OXSC, and Brian's macro bug is also fixed.

Brian Alvarez

Quote from: Chris Chancellor on December 19, 2018, 11:31:57 PM...looks like we need to wait for Charles latest progress zip on this.

Charles was very quick to get this fixed. :)

Chris Chancellor

Hello Charles

in regards to  "current OXSC"    how do we get the co2.exe ?   

do we have to compile the stuff that are inside this download link zip ?

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

Charles Pegge

#6
Hi Chris,

The recent OXSCs include oxygen.dll, RTL32 and RTL64 ready to use. The oxsc folder is only required for development and self-compiling.

Chris Chancellor

Thanxx a lot, Charles

as i won't be using JIT  then Oxygen.dll won't be used by me

i'm only interested in getting Co2.exe

so do you mean that i could compile the program "BuildCo2.o2bas"  located inside OXSC zip  file to get 
the latest  Co2.exe ?


James C. Fuller

Chris,
  In your current OxygenBasic folder just replace the oxygen.dll with the new one and replace the RTL32.inc and RTL64.inc in your OxygenBasic/inc folder with the new ones.
I suggest making backups.
James

Chris Chancellor

Thanxx a lot, James


Long time no hear from you. 

Charles Pegge

co2.exe is only a very thin shell for oxygen.dll :)

Chris Chancellor

Good to learn something here, Co2.exe is quite a good compiler as its output exe footprint or size is very small.

unlike those exe produce by C# which is quite chunky and it needs .Net framework to run.