The type of every built-in function is defined in the SmileBasic documentation. The type of every variable, parameter, and OUT-type value is determined by the suffix (or lack thereof) on the identifier. Where is there a need for 'typeof'?
Methods of determining variable type
Root / Programming Questions / [.]
snail_Created:
Something that SB lacks and would be rather helpful is some kind of typeof statement. Of course, we can make our own functions so I thought I would ask: are there any known methods of type detection? Only needing to check between number and string is fine for now, but checking for int/real and even array/value would be useful for the future.
Whoa, you're right.
PRINT TEST1(2)
PRINT TEST1("2")
END
DEF TEST1 (VAR1)
RETURN VAR1*2
END
shows
4
22
Wild!
A post made 2 days ago by calc84maniac is very helpful:
http://smilebasicsource.com/page?pid=51