HP Forums
Strange issue with new firmware [SOLVED] - 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: Strange issue with new firmware [SOLVED] (/thread-6375.html)



Strange issue with new firmware [SOLVED] - periappi - 06-07-2016 07:31 PM

Hello,

I'm encountering a strange issue with the new firmware. Indeed, whereas my old programs used to work on the former version, they don't anymore, and for something weird : the Prime doesn't seem to like the characters "/" and "\".

For example : in the function
RETURN("/!\ n < 30 /!\");
The debugger stops on "/" and "\".

NB : I tried to use pragma_mode, but it doesn't change anything.

Can you help me ?

Thanks,


RE: Strange issue with new firmware - salvomic - 06-07-2016 08:06 PM

hello,
/ should be used only to input the division and \n is a way to return "new line" (escaping)...
// is for a comment line in a program.
So is better don't use them in a return line.


RE: Strange issue with new firmware - Tim Wessman - 06-07-2016 08:19 PM

(06-07-2016 07:31 PM)periappi Wrote:  RETURN("/!\ n < 30 /!");
The debugger stops on "/" and "".

It is stopping on the incomplete escape character. If you are trying to print "/!\" in a string, you'll need to put \\ for each single instance of \ you want to print. Change it to be "/!\\ n < 30 /!\\" and you should be good.


RE: Strange issue with new firmware - cyrille de brébisson - 06-08-2016 05:00 AM

Hello,

The latest version does implement escape characters in strings:
\n, \t, \r, \", \ooo and \uxxxx.
Since \ is now an escape character, to enter \ by itself, you have to double it to enter it: ie: \\

Cyrille


RE: Strange issue with new firmware - periappi - 06-08-2016 06:56 AM

Thanks everybody ! It know works !