Undoc'd Feature?
|
07-03-2022, 09:14 AM
Post: #2
|
|||
|
|||
RE: Undoc'd Feature?
It's hard to trace exactly what is happening in the code without knowing the values in list A, but are you sure that it's actually decrementing?
When I use --X in an HPPL program, or on the Home screen, it is interpreted as -(-X), the negative of the negative of X. Likewise, ---X is -(-(-X)). In CAS programs (with #cas ... #end), or on the CAS screen, it does allow a++ and a-- but not ++a or --a. I don't know if this is considered a bug, but in CAS a++ is really doing ++a, incrementing BEFORE evaluating the expression. Likewise for a--. Same behavior in xcas. Maybe it's documented somewhere, but I couldn't find it. |
|||
« Next Oldest | Next Newest »
|
User(s) browsing this thread: 2 Guest(s)