Hi 4tH-ers!
I felt the need to add this for the following reason:
- Although TOK() returns an empty string when the buffer is empty, an empty string may not mean that the buffer is empty. It may just mean there's an empty string in the buffer.
What does it do?
- It returns the value of >IN.
How do you use it?
- Get the value of HERE() before calling TOK() if you evaluate HERE() afterwards and it equals the previous value, the buffer is empty:
p = HERE()
t = TOK(ORD(";"))
IF p = HERE() THEN PRINT "Empty buffer" : END.
It may be quirky, but face it: uBASIC IS quirky.. ;-)
Hans Bezemer