HP Forums
format() not acting as expected. - 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: format() not acting as expected. (/thread-17161.html)



format() not acting as expected. - matalog - 06-24-2021 03:41 PM

I have been trying to repeat something that the help file and also the manual mentions that should work.

Can anyone see what I am doing wrong?

I have attached an image file of the results of me trying to use format, like described in the manual:

format(9.3456,"s3")


RE: format() not acting as expected. - Didier Lachieze - 06-24-2021 03:54 PM

format is a CAS command, so format(9.3456,"s3") works in CAS, but in Home due to the way the commands are passed from Home to CAS the quotes around s3 are removed, so you get an error.
In Home if you type: format(9.3456,"\"s3\"") , it works.