Post Reply 
The "format" command
03-18-2016, 02:57 PM
Post: #2
RE: The "format" command
format is a CAS command while a PPL program is essentially executed in Home mode, so you have some adjustments to do.
You can refer to this excellent tutorial: HP Prime CAS programming

In your case the trick is to build a string with the parameters you want to pass to format:
Code:
EXPORT FormatTest()
BEGIN
LOCAL s;
s:="9.3456," + STRING("s3");
s:=CAS.format( s );
MSGBOX( s );
END;

Or you can use STRING instead of format:
Code:
EXPORT StringTest()
BEGIN
LOCAL s;
s:=STRING(9.3456,5,2);
MSGBOX( s );
END;
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
The "format" command - Moonwatcher - 03-18-2016, 12:59 PM
RE: The "format" command - Didier Lachieze - 03-18-2016 02:57 PM
RE: The "format" command - Moonwatcher - 03-18-2016, 03:54 PM



User(s) browsing this thread: 1 Guest(s)