Already reported these to Mike, but here are some things to look out for:
Lower() and Upper() are broken. It creates odd characters in the string.
Here is a temporary solution:
Function Lower$( text$ as string )
newText$ = ""
For i = 0 to Len( text$ )
char$ = Mid( text$,i,1 )
if Asc( char$ ) >= 65 and Asc( char$ ) <= 90
newText$ = newText$ + chr( Asc( char$ ) + 32 )
else
newText$ = newText$ + char$
endif
Next i
Endfunction newText$
Non - Global variables within functions do not reset their values:
If PointerWithin() is called and returns 1 then next time you call it, even if it's false it will return true.
In this code the "inArea" variable doesn't reset to 0 even though it isn't a Global variable. Simple solution for now is to add "inArea = 0" at the start of the function
Function PointerWithin( x# as float,y# as float,width# as float,height# as float )
if GetPointerX( ) > x# and GetPointerY( ) > y# and GetPointerX( ) < x# + width# and GetPointerY( ) < y# + height#
inArea = 1
endif
Endfunction inArea
Forced to "declare" strings before adding them:
This won't work:
But this will:
text1$ = ""
text1$ = text1$ + text2$
If you try the example code you'll notice it works, but if you comment out the "newText$ = "" " in the "Bug$()" Function you will notice that the Message() function will display a blank string instead of the word "newBug".
text1$ = "newBug"
Message(Bug$(text1$))
Do
Sync()
Loop
Function Bug$( text$ as string )
newText$ = ""
newText$ = newText$ + text$
Endfunction newText$