You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
The standard supports a REF_TO type marking a reference
Some IEC61131-3 Extensions like Codesys support a POINTER TO type
This feature is to add support for these types.
Describe the solution you'd like
Add a new Datatype: POINTER TO <TYPE> where TYPE is any available datatype
Add a new Datatype: REF_TO <TYPE> where TYPE is any available datatype
Accessing a datatype instance as &instance will be a reference to that type.
Accessing a pointer or reference to a type using instance^ will de-reference the type.
Pointers and references are equivalent / Interchangeable.
Pointers and References can be assigned to a DWORD which is the address of the value being referenced.
Additional context
A pointer or reference that have not been assigned have the value NULL
Accessing a NULL pointer or reference is undefined
The standard calls for a REF() function, and codesys also provides an ADR() function to retrieve the pointer address. These functions are not covered by this feature request.
The text was updated successfully, but these errors were encountered:
Is your feature request related to a problem? Please describe.
The standard supports a REF_TO type marking a reference
Some IEC61131-3 Extensions like Codesys support a POINTER TO type
This feature is to add support for these types.
Describe the solution you'd like
Add a new Datatype:
POINTER TO <TYPE>
whereTYPE
is any available datatypeAdd a new Datatype:
REF_TO <TYPE>
whereTYPE
is any available datatypeAccessing a datatype instance as
&instance
will be a reference to that type.Accessing a pointer or reference to a type using
instance^
will de-reference the type.Pointers and references are equivalent / Interchangeable.
Pointers and References can be assigned to a
DWORD
which is the address of the value being referenced.Additional context
A pointer or reference that have not been assigned have the value
NULL
Accessing a
NULL
pointer or reference is undefinedThe standard calls for a
REF()
function, and codesys also provides anADR()
function to retrieve the pointer address. These functions are not covered by this feature request.The text was updated successfully, but these errors were encountered: