StrIsString
Function StrIsString(a: String) : Boolean
Returns TRUE if the string supplied looks like a string
This is useful in a scripting engine to tell the difference between a variable name and a number (real or integer). The function returns TRUE if the string begins with the letters a-z, A-Z or underscore.
Example:
Program
Uses basilisk, pure2d
Begin
InitBasilisk(TRUE)
OpenScreen(640,480,32,FALSE,COB_SHOWCLOSE+COB_SHOWBORDER)
Text(10,10,"abc: "+StrIsString("abc"))
Text(10,30,"a123: "+StrIsString("a123"))
Text(10,50,"123: "+StrIsString("123"))
Text(10,70,"1.23: "+StrIsString("1.23"))
Text(10,90,"0.123: "+StrIsString("0.123"))
Text(10,110,"_0.123: "+StrIsString("_0.123"))
Text(10,130,"_abc: "+StrIsString("_abc"))
While Not ExitRequested
Flip
Pause(2)
Wend
End