Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Single quotes in double quoted string literals #7

Open
nkclayton opened this issue Jan 20, 2020 · 3 comments
Open

Single quotes in double quoted string literals #7

nkclayton opened this issue Jan 20, 2020 · 3 comments

Comments

@nkclayton
Copy link

A single quote is always interpreted as the start of a string literal even if it is embedded within a double quoted string literal. For example

image

In these circumstances it should be treated as part of the string and not a delimiter.

@zodiacfireworks
Copy link
Owner

zodiacfireworks commented Jan 21, 2020

I will try to fix this in the next days, if you can make a PR before of my fix, it would be great!

@nkclayton
Copy link
Author

nkclayton commented Jan 22, 2020

Not sure I have the skills to fix this but am happy to review any PR you create. Apologies if I have misunderstood what you meant.
Cheers,
Neil

@nkclayton
Copy link
Author

nkclayton commented Jan 28, 2020

Hi there,

Here's a snippet of CA/L code that could be used for testing issues 6 & 7:

PROCEDURE SimpleProcedure@1000000014(Parameter1@1000000000 : Code[20]);
VAR
  FunnyRecord@1000000001 : Record 60922;
  FieldValue@1000000002 : Decimal;
BEGIN
  {
  Function Simple procedure

  A simple procedure to check that it's OK to have an apostrophe in a block comment.
  }

  //  And a line comment to check that it's OK in here too!

    FieldValue := FunnyRecord."Funn'y Field Name";

    //Commented out block of code follows...
    {
       FieldValue := FunnyRecord."Funn'y Field Name 2";
       FieldValue := FunnyRecord."Funny F'ield Name 3";
       FieldValue := FunnyRecord."Funny Field N'ame 4";
    }
 END

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants