REPEAT . . . UNTIL loop problem
|
02-15-2021, 11:34 PM
Post: #21
|
|||
|
|||
RE: REPEAT . . . UNTIL loop problem
CAS> input := WAIT(-1)
["'input' is a reserved word, sto not allowed:",30] |
|||
02-16-2021, 09:06 AM
(This post was last modified: 02-16-2021 09:15 AM by Didier Lachieze.)
Post: #22
|
|||
|
|||
RE: REPEAT . . . UNTIL loop problem
(02-15-2021 11:03 PM)cahlucas Wrote: Here is the framework of my program, at least the part where you can derive control from. I will not publish the entire program here, to keep the overview as simple as possible. Things unrelated to program control have been left out. But this should be enough to track down the error. I hope you can find it. Sincerely, Karel. I have cleaned your code to remove the following sources of syntax errors:
Here is the cleaned code that is checking ok both on my Prime G1 V2.1.1445 (2020 01 16) and the virtual Prime same version. Just to remove any potential issue, as your signature mentions the Prime G2, you can check it on your Prime G2 and confirm if you have or not a syntax error: Code: #pragma mode( separator(.,;) integer(h32) ) (02-15-2021 11:46 PM)Gene222 Wrote: That is a lot of IF and CASE statements. I think the syntax of one of the CASE statements is wrong when you are using the DEFAULT statement. I think the DEFAULT statement does not require an END statement. The END of the case statement also acts as the END of the DEFAULT statement. So, you have too many END statements. Take a closer look at the example for the CASE statement in the calculator help.This doesn't generate any error in the example just above. |
|||
02-16-2021, 12:08 PM
Post: #23
|
|||
|
|||
RE: REPEAT . . . UNTIL loop problem
I noticed HP Prime allow invisible hard-space characters in code.
Replacing " UNTIL exit == 1;" with " UNTIL exit == 1;", I can cause a syntax error This might be a good practical joke for messing up other people's code |
|||
01-20-2023, 02:57 AM
Post: #24
|
|||
|
|||
RE: REPEAT . . . UNTIL loop problem
(02-16-2021 12:08 PM)Albert Chan Wrote: I noticed HP Prime allow invisible hard-space characters in code. Pasting this above into a Unicode viewer, I see a U+FEFF just before “UNTIL”. The handling of this code point (U+FEFF) is not affected by the recent change I’ve mentioned (https://www.hpmuseum.org/forum/thread-99...#pid168514 , https://www.hpmuseum.org/forum/thread-80...#pid168515). For this (U+FEFF), I’m thinking that hidden characters should not be so (so hidden, that is). (U+FEFF’s use as a zero-width non-breaking space is deprecated [U+FEFF is also used as a byte-order mark], so having it visible seems reasonable — and preferable to its current handling.) |
|||
« Next Oldest | Next Newest »
|
User(s) browsing this thread: 9 Guest(s)