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

Add support for special chars in strings #309

Closed
ghaith opened this issue Sep 27, 2021 · 1 comment · Fixed by #321
Closed

Add support for special chars in strings #309

ghaith opened this issue Sep 27, 2021 · 1 comment · Fixed by #321
Assignees
Labels
good first issue Good for newcomers

Comments

@ghaith
Copy link
Collaborator

ghaith commented Sep 27, 2021

Is your feature request related to a problem? Please describe.
Sometimes characters like a new line or carriage return need to be inserted in a STRING
The 61131-3 Standard supports such characters using the Dollar $ sign
Table 7 of the Standard describes the possible characters

Symbol Description
$$ Dollar Sign
$' Single Quote (Only in STRING)
$" Double Quote (Only in WSTRING)
$L Line Feed
$N New Line
$P Form feed
$R Carriage Return
$T Tab

Describe the solution you'd like
We should support these characters.
In LLVM, we could pass \HEX_CODE (e.g. \0A for new line) to pass an ascii value

@riederm riederm added the good first issue Good for newcomers label Sep 27, 2021
@99NIMI 99NIMI self-assigned this Oct 4, 2021
@create-issue-branch
Copy link

99NIMI added a commit that referenced this issue Oct 5, 2021
ghaith added a commit that referenced this issue Oct 12, 2021
* added support for special chars (#309)

* fix problems with utf8 and utf16

Co-authored-by: Ghaith Hachem <[email protected]>
@99NIMI 99NIMI linked a pull request Oct 12, 2021 that will close this issue
@99NIMI 99NIMI closed this as completed Oct 12, 2021
@ghaith ghaith moved this to Done in Next Jan 9, 2023
@ghaith ghaith added this to Next Jan 9, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

3 participants