EEX Problem with CAS Programs - Printable Version +- HP Forums (https://www.hpmuseum.org/forum) +-- Forum: HP Calculators (and very old HP Computers) (/forum-3.html) +--- Forum: HP Prime (/forum-5.html) +--- Thread: EEX Problem with CAS Programs (/thread-1691.html) |
EEX Problem with CAS Programs - Helge Gabert - 06-23-2014 12:36 AM Drove me nuts: My CAS program wouldn't compile for some reason; I checked all the lines of code, re-checked, still didn't work. Only after isolating each expression, I became clear that in "1E-3", "E" apparently cannot be typed in with the EEX key. Instead, the user needs to erase the funny looking "E" (from EEX) and replace it in the program with the "E" from the letter keys. Unbelievable. (This is not a problem with non-CAS programs). RE: EEX Problem with CAS Programs - Joe Horn - 06-23-2014 04:12 AM (06-23-2014 12:36 AM)Helge Gabert Wrote: Drove me nuts: Correct: A small "E" exponent symbol immediately followed by a negative sign cannot be parsed correctly by CAS. This is a known bug (mentioned in this forum before). Example: 1. Home 2. EEX [+/-] 3 (don't press Enter) 3. CAS 4. Enter --> error As you noticed, the workaround is to use an ordinary "E" or "e" instead of EEX in CAS programs, CAS formulae in the Spreadsheet, etc. The EEX key can be used in the CAS itself, however, because in CAS it types an "e", not the special small "E". RE: EEX Problem with CAS Programs - Helge Gabert - 06-23-2014 09:23 PM Good to know. I also don't like the fact that after compilation, certain CAS program lines with branches or loops get saved in one line in the editor (makes for long lines with scrolling to the right of the screen, which gets cumbersome). This is also not the case for non-CAS programs, which can be edited just the same way they were compiled the first time. RE: EEX Problem with CAS Programs - Rich - 06-23-2014 09:32 PM An actual debugger for CAS functions would be nice, too. When copying and pasting certain Greek characters from my text editor it doesn't always accept every symbol. RE: EEX Problem with CAS Programs - Helge Gabert - 06-23-2014 09:56 PM That's right, there is no debug or run soft key! RE: EEX Problem with CAS Programs - eried - 06-23-2014 10:25 PM (06-23-2014 09:32 PM)Rich Wrote: An actual debugger for CAS functions would be nice, too. When copying and pasting certain Greek characters from my text editor it doesn't always accept every symbol. What happens if you put debug(); in a cas function? RE: EEX Problem with CAS Programs - Rich - 06-23-2014 10:45 PM When entering in debug(); at the end of a cas function, i do not get any extra results when running it, though if i enter debug(abcd(h(s))) where abcd is the name of my CAS function i get this nifty screen... not sure how to proceed on it. Pressing most keys, such as F2 or F6 on the real keyboard or the prime's keypad doesn't seem to effect it. [attachment=886] RE: EEX Problem with CAS Programs - eried - 06-23-2014 11:09 PM (06-23-2014 10:45 PM)Rich Wrote: When entering in debug(); at the end of a cas function, i do not get any extra results when running it, though if i enter debug(abcd(h(s))) where abcd is the name of my CAS function i get this nifty screen... not sure how to proceed on it. Pressing most keys, such as F2 or F6 on the real keyboard or the prime's keypad doesn't seem to effect it. Use debug(); before the line you want to debug, or at the start (example after BEGIN). The Debug(----) looks interesting :O but I don't know what it is that. RE: EEX Problem with CAS Programs - Rich - 06-23-2014 11:24 PM If I put debug(); before a specific line i get almost the same screen, which maybe this means something helpful. If put debug(); after BEGIN, i get a syntax error. Though the output appears to have errors, i know that it doesn't since it works correctly when calling the function from the CAS screen. The virtual calculator crashes after this Its OK though, i have my finals this week and I can lay my HP prime out to pasture for a month or two before next semester... : ) Thank you [attachment=888] RE: EEX Problem with CAS Programs - Rich - 06-26-2014 04:13 PM Quote:Use debug(); before the line you want to debug, or at the start (example after BEGIN). The Debug(----) looks interesting :O but I don't know what it is that. So, I suppose there is a CAS debug, after fiddling around with debug(function_name(a,b)) in the CAS command line, the screen you get allows you to step into the CAS function one step at a time. Pressing up arrow moves it forward. The status of the variables are described on the bottom. I am not sure if this is a feature or not. There is no description of it in the user manual V2, specifically for CAS functions. |