HP Forums
FW: 15048; CAS programs return Syntax Error - 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: FW: 15048; CAS programs return Syntax Error (/thread-22100.html)



FW: 15048; CAS programs return Syntax Error - Eddie W. Shore - 07-29-2024 07:35 PM

Programs entered in the program editor with the CAS box checked return the Syntax Error. I can not figure out what is wrong.

Code:

#cas
erroz(h):=
BEGIN
h+1;
END;
#end

I had no trouble with the above code prior to version 15048.

Defining this on the CAS Mode page (outside of the programming editor),

Code:

erroz(h):=h+1



RE: FW: 15048; CAS programs return Syntax Error - komame - 08-05-2024 03:01 PM

It seems that when you select the 'CAS' option while creating a program, the program does not accept the #CAS #END tags in its content, even though they are included in the program template.

Entering just the program content (without #CAS #END) was accepted and works correctly:
Code:
erroz(h):=
BEGIN
h+1;
END;

When the 'CAS' option is not selected, #CAS #END are still required.

Just don't use the 'CAS' option until it gets fixed.


RE: FW: 15048; CAS programs return Syntax Error - Eddie W. Shore - 08-14-2024 12:32 PM

Code:
erroz(h):=
BEGIN
h+1;
END;

Just typing in the program in the program editor will cause a Syntax Error.

However, checking the CAS box and the subsequently erasing the #cas and #end doesn't cause an error. Also, the program runs smoothly.


RE: FW: 15048; CAS programs return Syntax Error - Helge Gabert - 09-06-2024 10:05 PM

I have the same problem after updating to the current firmwarer version from Sep 1, 2024. Programs composed in the program editor, with the CAS box checked,(without #cas and #endWink, and run from the CAS main page, returns a rectangle. The firmware version from Oct 2018 didn't have that problem. How do I create a CAS program that will actually run?


RE: FW: 15048; CAS programs return Syntax Error - Eddie W. Shore - 09-07-2024 03:50 PM

Try using a RETURN command? I did not have problems with getting results. Although I get a "Running non recursive emulator" message when running the program.

I have a G2.


RE: FW: 15048; CAS programs return Syntax Error - Helge Gabert - 09-07-2024 04:59 PM

Thanks so much for your reply. It works now (with or without a RETURN statement). I suspect some CAS variables got corrupted; purging them must have helped.

However, since CAS programs are now created without the #cas . . . #end brackets in the program editor, I wonder how this will all resolve, if a future upgrade of the firmware restores the old cas syntax. Will running the now created cas programs require the user to manually insert #cas . . . #end for each and every program?

I guess we'll find out.


RE: FW: 15048; CAS programs return Syntax Error - Wes Loewer - 09-09-2024 06:24 PM

(09-07-2024 04:59 PM)Helge Gabert Wrote:  Will running the now created cas programs require the user to manually insert #cas . . . #end for each and every program?

Yes, you'll need to insert #cas . . . #end manually for the time being. The bug tracker shows that this has been fixed, so hopefully it will show up in the next release.

Strangely enough, some of my CAS programs are working with the new firmware and some are not, even after a CAS restart. Not sure what's going on there.


RE: FW: 15048; CAS programs return Syntax Error - Helge Gabert - 09-09-2024 10:59 PM

Is there anything common to older programs that now refuse to run? Can you post one?

My old CAS programs which contain the CAS wrapper all seem to work. And the new ones, which don't contain the CAS wrapper, so far also work. (I was only concerned about a future firmware release which might expect the wrapper to be present).


RE: FW: 15048; CAS programs return Syntax Error - Wes Loewer - 09-12-2024 01:54 PM

(09-09-2024 10:59 PM)Helge Gabert Wrote:  Is there anything common to older programs that now refuse to run? Can you post one?

Even as something as simple as this generates a "Syntax Error"
Code:
#cas
aaa():=
begin
 return 123.456;
end;
#end

Yet, other longer programs work fine.


RE: FW: 15048; CAS programs return Syntax Error - Helge Gabert - 09-13-2024 03:11 AM

Yes, confirmed. But it works for me if I add a dummy variable, e.g., aaa(k) and call it from Home or CAS with something like aaa(1).