JAL language extension: suggestion

37 views
Skip to first unread message

David VB

unread,
Feb 18, 2025, 8:25:46 AM2/18/25
to jallist
Hi,

One nice addition to JAL would be, IMHO, the ability to treat sets of values.   
It would be simplier to give some example, instead of describing:

var byte dummy
dummy = 100
if dummy IN [0..127] then ......     ; Will be TRUE

if dummy IN [50..100]      Will be true
if dummy IN [50..100-1]      Will be false

Of course, those literals could be replaced by variables also:
if dummy IN [low_value .. High_value] then  ....

One step further would be to allow set of discrete values such as:
if dummy IN [12, 45, 87, 100, 255]    will be true
and the same with variables
if dummy IN [min_value, 45, 87, 100, high_value]

The complement of the IN operator will be NOT IN as in:
if dummy NOT IN [min_value..max_value]

An advantage that I see is that there will be no regression with the current syntax, and that it is probably not too difficult to implement.

What do you think ?


Rob CJ

unread,
Feb 20, 2025, 2:55:03 PM2/20/25
to jallist
Hi David,

It would be a nice addtion but I do not feel confident enough to add this to the compiler.

I sometimes manage to fix bugs but I still do not understand a big part of what is done where in all the source files of the compiler.

I can add it to GitHub issue as an enhancement request until somebody want to accept this challenge.

Kind regards,

Rob


Van: jal...@googlegroups.com <jal...@googlegroups.com> namens David VB <pinhe...@gmail.com>
Verzonden: dinsdag 18 februari 2025 14:25
Aan: jallist <jal...@googlegroups.com>
Onderwerp: [jallist] JAL language extension: suggestion
 
--
You received this message because you are subscribed to the Google Groups "jallist" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jallist+u...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/jallist/ccbba278-6272-45a2-a3a0-7b90ab71abd0n%40googlegroups.com.

Matthew Schinkel

unread,
Mar 7, 2025, 4:33:17 PM3/7/25
to jallist
If this can be done with a function or procedure, then there is no need to add it to the compiler.

David VB

unread,
Mar 10, 2025, 6:42:06 AM3/10/25
to jallist
Good point.
Reply all
Reply to author
Forward
0 new messages