Welcome to our new forum
All users of the legacy CODESYS Forums, please create a new account at account.codesys.com. But make sure to use the same E-Mail address as in the old Forum. Then your posts will be matched.
Close
Does anybody know if there is some Codesys OOP variant of the WITH statement?
This type of statement would be usefull when initiliasing objects or setting more then one property at the same time.
pseudocode example;
WITH <object> DO
.<property1> := Value1;
.<property2> := Value2;
.<property3> := Value3;
.<property4> := Value4;
END_WITH;
Hermsen hat geschrieben:
Does anybody know if there is some Codesys OOP variant of the WITH statement?
This type of statement would be usefull when initiliasing objects or setting more then one property at the same time.
pseudocode example;
WITH <object> DO
.<property1> := Value1;
.<property2> := Value2;
.<property3> := Value3;
.<property4> := Value4;
END_WITH;
Does anybody know if there is some Codesys OOP variant of the WITH statement?
This type of statement would be usefull when initiliasing objects or setting more then one property at the same time.
pseudocode example;
WITH <object> DO
</property4></property3></property2></property1></object>.<property1> := Value1;
.<property2> := Value2;
.<property3> := Value3;
.<property4> := Value4;
END_WITH;
Originally created by: Viacheslav Mezentsev
Originally created by: rickj
You could also use the REFERENCE data type instead of POINTER
The above options will do the trick I guess! thank you for the response!