Menu

I cannot view or enter control characters

Help
2006-11-13
2013-05-20
  • Daniel Graham

    Daniel Graham - 2006-11-13

    I am new to EPIC -- I've not found the way to either view or enter control characters using the
    Perl Editor plug-in.

      I have a lot of old code which uses the control character variables, such as $^V ($PERL_VERSION).
    When I use EPIC with the code, "$^V" shows up as "$".

    The line executes just fine, and I can cut and paste the "$", and still have it pick up the invisble ^V, but
    I have to edit the files in another editor to do see what is going on.

    Am I missing something or is there really no way to work with the control character variables?

    In new code, I'm using "use English", but that does not really address the issue that the
    editor disallows legal Perl syntax.

     
    • Jan Ploski

      Jan Ploski - 2006-11-13

      You did not mention your version of EPIC. The current version 0.5.21 (and 0.4.21) works all fine here - same syntax highlighting for $^V as for $PERL_VERSION. Also, I don't recall ever having trouble with the built-in variables disappearing. Maybe you should experiment with fonts (Window/Preferences/General/Appearance/Colors and Fonts/Basic/Text Font) or syntax highlighting preferences (Window/Preferences/Perl EPIC/Editor/Syntax/Variable).

      When you enter $^V you type three keystrokes, $, ^ and V, right?

       
    • Daniel Graham

      Daniel Graham - 2006-11-14

      Jan -- Thanks for the quick reply,

      I have to admit I'm feeling foolish... 
      I was not typing $^V ( dollar, caret, V ) --

      In my old code, (for which I use emacs, I've type in the control characters
      (emacs quote next char, which is by default ctrl-Q, then the char ,in the example I
      cited ctrl-V) the variable is in the text as a single control-char.  Not a caret - char
      doublet. 

      After reading your post, I re-read the perlvar page, carefully.  There it says,

             ..... Perl has  a special syntax for the single-control-character names: It understands
             "^X" (caret "X") to mean the control-"X" character.  For example, the
             notation $^W (dollar-sign caret "W") is the scalar variable whose name
             is the single character control-"W".  This is better than typing a lit-
             eral control-"W" into your program.

      So -- there is a an easy work-around to the problem -- I just replace all the literal control-chars
      with the caret-char combination. 

      However -- I still believe it a bug -- although minor, that the Perl Eclipse Editor shows a bare $ sign
      when editing code with literal control char variables.  I will look into fixing this when I get a chance.

      Again -- Thanks for pointing me to an easy solution.

      Dan

       

Log in to post a comment.

MongoDB Logo MongoDB