Post Reply 
FW 10077 - escape sequences
05-29-2016, 04:38 PM
Post: #1
FW 10077 - escape sequences
I'm glad to see escape sequences has made its way to the Prime.
So far I tested "\n" and "\t" - both work but "\t" produces a rectangle in terminal output (both physical Prime and emulator).


Attached File(s) Thumbnail(s)
   
Find all posts by this user
Quote this message in a reply
05-30-2016, 04:56 AM
Post: #2
RE: FW 10077 - escape sequences
Hello,

Complete list is:
"" -> "
\" -> "
\0
\n
\r
\t
\ooo where o are octal numbers
\xhh and \uhhhh where h are hex numbers

Cyrille

Although I work for the HP calculator group, the views and opinions I post here are my own. I do not speak for HP.
Find all posts by this user
Quote this message in a reply
06-08-2016, 02:50 PM
Post: #3
RE: FW 10077 - escape sequences
Hello,

thanks for the list. I recognized a problem with \t that is only printing a little rectangle but not a real tab-space.

Michael
Find all posts by this user
Quote this message in a reply
06-08-2016, 04:58 PM
Post: #4
RE: FW 10077 - escape sequences
rectangle that is very unpleasant, when I copy a program for example from notepad++ to the hpprime (simulator), could be implemented in firmware upcoming conversion to spaces
Find all posts by this user
Quote this message in a reply
06-08-2016, 04:59 PM
Post: #5
RE: FW 10077 - escape sequences
Well, the reason here is that there is no character in the font for a tab, so it sticks in the "there is no character" box. In order to properly support tabs you have to do it everywhere and that is a pretty big task which is tied in with some other work on the editor and hence hasn't been done yet.

TW

Although I work for HP, the views and opinions I post here are my own.
Find all posts by this user
Quote this message in a reply
06-08-2016, 05:07 PM
Post: #6
RE: FW 10077 - escape sequences
Thanks for explaining. Didn't know that tab is character or represented by characters in output/terminal, I thought it is a method to put the cursor to a defined position in a text line.
Find all posts by this user
Quote this message in a reply
06-08-2016, 05:58 PM
Post: #7
RE: FW 10077 - escape sequences
(06-08-2016 05:07 PM)Michael K-K Wrote:  Thanks for explaining. Didn't know that tab is character or represented by characters in output/terminal, I thought it is a method to put the cursor to a defined position in a text line.

Well, that is kind of my point. Tab is a character, specifically a "control character" (https://en.wikipedia.org/wiki/Control_character).

Since the 2d expression editor is more of a general editor though, we kept the default freetype2 behavior to print out a box for any "missing" character the user puts in (otherwise you'd not be able to see anything was there and get strange behavior and no way to see where to delete something). In most cases, this works fine. Tabs however probably will get support, but it needs to be carefully done to avoid introducing other issues.

For example, I could stick in a character that was 2/4 spaces wide in the font, but that would screw up the use of that font in the connkit, as well as make it not behave as expected with alignment.

If the 2d editor/command line gets this support, it would still be missing from other places like the terminal, pop up boxes, etc. So it is a bigger task to do properly. Its on the list of things to do, and seems to fit nicely with the enhancement/changes with the text display/terminal/user text commands.

TW

Although I work for HP, the views and opinions I post here are my own.
Find all posts by this user
Quote this message in a reply
Post Reply 




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