[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4762: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3897)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4764: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3897)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4765: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3897)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4766: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3897)
newlispfanclub.alh.net • View topic - Primitive "case" does not work

Primitive "case" does not work

Q&A's, tips, howto's

Primitive "case" does not work

Postby lyl » Wed Jun 05, 2019 8:56 am

lyl
 
Posts: 37
Joined: Sun Mar 25, 2018 5:00 am

Re: Primitive "case" does not work

Postby ralph.ronnquist » Wed Jun 05, 2019 9:37 am

ralph.ronnquist
 
Posts: 216
Joined: Mon Jun 02, 2014 1:40 am
Location: Melbourne, Australia

Re: Primitive "case" does not work

Postby lyl » Wed Jun 05, 2019 9:48 am

Many thanks @ ralph.ronnquist for your solution!!
Though I can't understand why the case term is designed not to evaluate the branch keys. Anyone knows the reason?
lyl
 
Posts: 37
Joined: Sun Mar 25, 2018 5:00 am

Re: Primitive "case" does not work

Postby ralph.ronnquist » Wed Jun 05, 2019 12:43 pm

I suppose it links back to how the case term works in other Lisp variations.

There are also other conditional term forms such as if and cond to fill the need. Perhaps the prior question would be to ponder why having a case term at all.
ralph.ronnquist
 
Posts: 216
Joined: Mon Jun 02, 2014 1:40 am
Location: Melbourne, Australia


Return to newLISP in the real world

Who is online

Users browsing this forum: No registered users and 2 guests

cron