sczot Posted January 15, 2020 Report Posted January 15, 2020 Hello all, is there a way to declare an array of constants with different values for each of array element?
DWIM Posted January 17, 2020 Report Posted January 17, 2020 No, i think. There is a workaround: Define an array as VAR ==> CONST_LABEL1 (Uppercase indicates in programming a constant) Define each constant as single entity at position 2,3,... in the dialog of your picture ==> CONST_LABEL_1, CONST_LABEL_2 At startup move these constants to the var. Rule: Do never overwrite in your code anything which has all UPPERCASE.
panic mode Posted January 18, 2020 Report Posted January 18, 2020 If concern is that someone may inadvertently modify value, dont use array. Create function that has index as parameter and returns value. Index could be an onteger, enumeration, string or whatever you like.
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now