COMX Club Forum

A forum about the COMX computer
It is currently Sat Apr 27, 2024 2:20 pm

All times are UTC + 1 hour [ DST ]




Post new topic Reply to topic  [ 1 post ] 
Author Message
PostPosted: Thu Sep 16, 2021 2:06 pm 
Offline
User avatar

Joined: Wed Apr 18, 2012 3:56 pm
Posts: 2
Location: Västerås, Sweden
Is there any way to assign truth values in either 1802 based BASIC?

I mean on other home computers you can use something like A = A - (B=C) which means A will increase only in case B=C.
Most Microsoft variants evaluate true = -1 and false = 0, while a few like Atari, Sinclair, Acorn (?) use values +1 and 0.

But on e.g. Comx BASIC and all the other 1802 ones I've tried including Telmac, Cosmac Elf etc, this generates a syntax error.

I kind of came up with a solution involving SGN(B-C) etc which works in some cases but is not universal.

Did I miss something or does ever 1802 based BASIC lack the ability to assign and use the result of comparisons in further calculations?

Yes, I'm having a long-term goal to learn enough Comx BASIC to enter next year's 10 Liner BASIC contest but without this ability it looks like somewhat limited entries if one has to waste one IF statement for every such case, in particular as I understand that ELSE is not implemented.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 1 post ] 

All times are UTC + 1 hour [ DST ]


Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB® Forum Software © phpBB Group