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 ADR and REF functions #373

Closed
ghaith opened this issue Nov 12, 2021 · 0 comments
Closed

Add support for ADR and REF functions #373

ghaith opened this issue Nov 12, 2021 · 0 comments
Labels
compatibility-oscat syntax or semantics which are not necessarily part of the standard, but seen in the oscat-libraries enhancement New feature or request language feature (norm) a missing language feature according to iec61131-3

Comments

@ghaith
Copy link
Collaborator

ghaith commented Nov 12, 2021

Is your feature request related to a problem? Please describe.

the REF function is defined in the norm to return a pointer to the given value.
REF will only return a correct datatype reference (Not an address)
Calling REF on temporary or function variables is not supported.

The ADR function is used in Codesys and similar systems to create a pointer.
We can repurpose it to return a pointer size type (not DWORD as it is now)
This newly defined pointer type should be tracked in #353
The result of the ADR function should be assignable to/from a reference.

Additional context
We currently use the & operator as a REF, we should free that operator to be used as AND later as described in the norm.

@ghaith ghaith added compatibility-oscat syntax or semantics which are not necessarily part of the standard, but seen in the oscat-libraries enhancement New feature or request language feature (norm) a missing language feature according to iec61131-3 labels Nov 12, 2021
@ghaith ghaith closed this as completed Apr 26, 2022
@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
compatibility-oscat syntax or semantics which are not necessarily part of the standard, but seen in the oscat-libraries enhancement New feature or request language feature (norm) a missing language feature according to iec61131-3
Projects
No open projects
Status: Done
Development

No branches or pull requests

1 participant