Sign in to follow this  
Followers 0
pat.stave

GXWorks2 - Quotation mark string constant

5 posts in this topic

Posted (edited)

How can i write a string constant to represent the character " (american quotation mark, ASCII code 34dec).

I've tried the following:

  • '"' (single quotation mark, american quotation mark, single quotation mark)
  • '$"' (single quotation mark, escape character, american quotation mark)
  • """ (american quotation mark, american quotation mark, american quotation mark)
  • "$"" (american quotation mark, escape character, american quotation mark, american quotation mark)

None of these are seen as valid by GX Works 2. How do i represent an american quotation mark as a string constant?

Edited by pat.stave

Share this post


Link to post
Share on other sites

Pretty sure the IEC method for entering strings is in single quotes... So try putting your double quote inside a pair of single quotes.

Share this post


Link to post
Share on other sites
9 minutes ago, Crossbow said:

Pretty sure the IEC method for entering strings is in single quotes... So try putting your double quote inside a pair of single quotes.

Nope, doesn't work.

Share this post


Link to post
Share on other sites

hi,

is it ok like this?

code.png

Share this post


Link to post
Share on other sites
2 hours ago, sczot said:

hi,

is it ok like this?

code.png

Thanks. Ended up doing it in this manner. Not very elegant as i use the character many places (including inside functions that cannot access global labels). But - it works!

 

 

temp.PNG

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0