Bug in nested loop CAS break/continue [n]
|
11-19-2018, 10:31 PM
(This post was last modified: 11-20-2018 06:37 AM by Laka.)
Post: #1
|
|||
|
|||
Bug in nested loop CAS break/continue [n]
Hey guys, just trying to contribute a bit. I really do like my HP Prime but have recently found an issue.
When using the break or continue statements in both Home and CAS modes, nested loops will show the same effect, e.g. when you use this in home mode: Code: export TestContHome() Or, the same in CAS mode: Code: #cas You will get the same result: Code: a=1,b=1 But if you use the optional [n] parameter to break out to the the outer loop, the result is different. Try replacing the continue statement like this (to get you to the outer level): Code: if even(b) then CONTINUE 2; end; In Home mode, the result is as expected, bypassing the inner loop: Code: a=1,b=1 But in CAS mode, this CONTINUE statement is totally ignored, giving this output: Code: a=1,b=1 This applies both to BREAK and CONTINUE, so I am suspecting a CAS bug. Just to clarify, when using BREAK 2 instead of CONTINUE 2, in Home mode you will get: Code: a=1,b=1 Code: a=1,b=1 I am running Build 2.1.14181. Maybe I am overlooking something, but I would really like to know. Regards, Dag |
|||
11-20-2018, 06:32 AM
Post: #2
|
|||
|
|||
RE: Bug in nested loop CAS break/continue [n]
There is no support for this kind of break/continue inside the CAS.
|
|||
11-20-2018, 06:53 AM
Post: #3
|
|||
|
|||
RE: Bug in nested loop CAS break/continue [n]
(11-20-2018 06:32 AM)parisse Wrote: There is no support for this kind of break/continue inside the CAS. I realize that this is not a problem with the CAS itself, but that the HP Prime is executing differently in CAS mode compared to Home mode. And there is no problem to code around this when you are aware. But where are these differences documented? |
|||
11-22-2018, 08:14 AM
Post: #4
|
|||
|
|||
RE: Bug in nested loop CAS break/continue [n]
(11-20-2018 06:32 AM)parisse Wrote: There is no support for this kind of break/continue inside the CAS. So shouldn't it give a syntax error or something in CAS mode? Tom L Cui bono? |
|||
« Next Oldest | Next Newest »
|
User(s) browsing this thread: 1 Guest(s)