Two new uBasic/4tH features

25 views
Skip to first unread message

The Beez

unread,
Nov 8, 2023, 11:02:28 AM11/8/23
to 4tH-compiler
Hi 4tH-ers!

I know this is not for everyone - but I thought I'd mention it all the same:
  • Some people like to use single line IF statements within a multi line IF. For those I added "FI". It's less intrusive than a full "ENDIF";
  • I noticed there was no formatting word. Instead of adding an entire new word, I expanded STR() with an optional format. The old STR() will continue to function correctly.
E.g.

a = -25
radix 16

if a>0 then
  b = str("$+###", a)
else
  if a < 0 then b:= str(a) : fi
  if a = 0 then b:= "blabla" : fi
endif

print show(b)

Hans Bezemer

Phillip Kelly

unread,
Nov 8, 2023, 12:30:15 PM11/8/23
to 4th-co...@googlegroups.com
Thanks Hans,

Very nice


--
You received this message because you are subscribed to the Google Groups "4tH-compiler" group.
To unsubscribe from this group and stop receiving emails from it, send an email to 4th-compiler...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/4th-compiler/ccbe9365-6e0c-46b3-8511-36e85503cb8cn%40googlegroups.com.


--
Yours Sincerely
Mr. Phillip Kelly
 

Reply all
Reply to author
Forward
0 new messages