HERE() is new in uBasic. But what does it do?

4 views
Skip to first unread message

The Beez

unread,
May 27, 2021, 4:48:57 PM5/27/21
to 4tH-compiler
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
Reply all
Reply to author
Forward
0 new messages