Skip to main content
Bob_Niland
Community Expert
Community Expert
July 29, 2011
Question

\x3c and \x5c in Variables

  • July 29, 2011
  • 1 reply
  • 2753 views

Help advises us that if we want to use angle brackets ("<" or ">", although only "<" seems to matter) in a Variable definition, we should prefix (escape) them with a backslash ("\").

Help fails to advise us that the same is true for backslash itself, and further, that typing either "<" or "\" via their \x## hex codes can trip you up.

I wanted to create a var for the symbolic "therefore", the 3-dot triangle.

With a Character Format of Symbol defined,

I entered the definition:

<Symbol>\x5c<Default ¶ Font>

but when I hit [ Insert ], what I got was "<Default ¶ Font>" in Symbol font.

Frame had silently changed the "\x5c" to "\",

definition now: <Symbol>\<Default ¶ Font>

treated the resulting character as an escape of nothing in particular,

and then ignored it altogether.

I had to go back and revise the var def to:

<Symbol>\\<Default ¶ Font>

The same thing (symbolic <Default ¶ Font> result) happens with

"\x3c" for "<",

but not with "\x3e" for ">".

When a hex code is a printable latin character, Frame automatically converts it to that character when creating or editing a Variable definition. It neglects to advise you about this, and more egregiously, neglects to follow its own special character rules, but enforces the rules anyway.

    This topic has been closed for replies.

    1 reply

    Bob_Niland
    Community Expert
    Community Expert
    July 29, 2011

    When a hex code is a printable latin character, Frame automatically converts it to that character

    Testing further, that rule seems to be "printable `standard' character", which includes many not on your keyboard.

    I frankly would prefer that Frame leave a correct var def AS ENTERED, rather than try [and in this case fail] to be so user friendly.

    Jeff_Coatsworth
    Community Expert
    Community Expert
    July 29, 2011

    You should add this to the help files?

    Jeff_Coatsworth
    Community Expert
    Community Expert
    July 29, 2011

    You...

    Moi?

    I'm just an end user.

    ... should add this to the help files?

    I was only able to test FM7.1 Unix and FM9 Win.

    it is not inconceivable that all of it is fixed or documented in FM10.

    If not fixed in 10, then these issues merit one or bug reports.

    At least the manual/Help would need to be changed.

    However, the point of the posting was for all the users of legacy editions, where there is zero chance of any updates to documentation or code.

    _____

    ... plus it was posted for readership amusement.

    I found the Frame behavior at least as funny as the average Dilbert, XKCD or UserFriendly cartoon.


    You - the end user - can submit changes to the help in FM9 for sure through the Commenting. If it's a bug, then submit a bug report - more squeak, more grease.