Stuff related to the LOLCODE language.
2 posts Page 1 of 1
Postby LeartS » Sun Nov 16, 2014 1:19 pm
Copy pasted from the lci GitHub issue:

I am sorely missing a "continue" operator, something that allows me to immediately go to the next iteration of a loop. At the moment I have to put everything in a O RLY? statement.

Here are my suggestions:
  • DONT CARE
  • NEVERMIND

Examples:

Code: Select all
IM IN YR LOOP UPPIN YR N WILE DIFFRINT N 101
    BOTH SAEM MOD OF N 10 0, O RLY?, YA RLY, NEVERMIND, OIC
    BTW DO STUFF HERE WHEN N IS NOT DIVISIBLE BY 10
IM OUTTA YR LOOP


What do you think?
Postby jjm » Sun Nov 16, 2014 9:12 pm
I agree, this is something that definitely needs to be added to the language.

I'll let others comment on the particular syntax used, but one thing I've thought about for the continue operator in LOLCODE is whether it has C-style semantics and continues the innermost loop or whether it has Perl-style semantics and allows you to specify the loop identifier (the part from IM IN YR ___) to continue?

It seems reasonable to have the loop identifier be optional and by default continue the inner-most loop. What do you think?
2 posts Page 1 of 1

Login

Who is online

Users browsing this forum: No registered users and 2 guests