Including apostrophe in a variable

easabanganeasabangan Member Posts: 114
Hi,

Just want to add the string ' in a variable. How can I do it?

Have tried this code. But experiencing error.
StrTxt := '123';
   Strtxt := ''' + StrTxt;
   MESSAGE(StrTxt);
No future at CPI

Comments

  • cnicolacnicola Member Posts: 181
    StrTxt := '123';
    Strtxt := '''' + StrTxt;
    MESSAGE(StrTxt);

    You needed an extra apostrophe. Normally an apostrophe marks the beginning of a special character if I recall correctly from my days of reading the manual :oops:
    Apathy is on the rise but nobody seems to care.
  • easabanganeasabangan Member Posts: 114
    cnicola wrote:
    StrTxt := '123';
    Strtxt := '''' + StrTxt;
    MESSAGE(StrTxt);

    You needed an extra apostrophe. Normally an apostrophe marks the beginning of a special character if I recall correctly from my days of reading the manual :oops:

    Got it. Thanks.
    No future at CPI
Sign In or Register to comment.