8 Replies Latest reply: Feb 13, 2018 12:32 PM by Michael Marchese RSS

    how to escape a semicolon?

    Michael Marchese

      I'm trying to build a string with a semicolon in it.  Is it possible? 


      Here are my failed attempts, which all produce this error: "Unknown statement: World".

      Let a = 'Hello ; World';
      Trace $(a);
      Let a = 'Hello ' & chr(59) & ' World';
      Trace $(a);
      Let a = Replace('hello ~ World', '~', chr(59));
      Trace $(a);
      Let a = 'Hello ;; World';
      Trace $(a);
      Let a = 'Hello \; World';
      Trace $(a);
      
      


      The last 2 were just desperate grasps at straws based on the fact that quotes can be escaped by doubling them up (even though the syntax highlighter has no clue).


      I also tried using Set instead of Let and then doing the Let in a second step, with the same outcome:

      Set a = 'hello ' & chr(59) & ' there';
      Let b = $(a);
      Trace $(b);
      
      


      For reference, the same statements work fine if I use a colon instead.  They print "Hello : World".

      Let a = 'Hello : World';
      Trace $(a);
      Let a = 'Hello ' & chr(58) & ' World';
      Trace $(a);
      Let a = Replace('Hello ~ World', '~', chr(58));
      Trace $(a);