Yes it does. That's why they are called constants. They get evaluated once and calls will always return that value. ooRexx already has a ::CONSTANT directive, but it was restricted to literal values. This expands the concept to allow the constant value to be computed rather than just a literal.
Rick On Wed, Dec 19, 2018 at 9:28 AM Jeremy Nicoll <jn.ml.sfrg...@letterboxes.org> wrote: > On Wed, 19 Dec 2018, at 07:29, P.O. Jonsson wrote: > > >What is the added value of declaring a value as a > > constant compare to just allocating a variable? I understand that for a > > language like C it might make a difference (as to where and when the > > constant is allocated by the compiler) but for ooRexx? If you never > > change the variable it is „constant“, right? > > In other languages the crux is in your "If you never change the variable" > condition; either the compiler or runtime code will object to anything > that does try to change the constant's value. > > Thus declaring something (that should never change) a constant is a > useful way to protect yourself from accidental changes to the wrong > variable. > > Does that apply here too? > > > -- > Jeremy Nicoll - my opinions are my own. > > > _______________________________________________ > Oorexx-devel mailing list > Oorexx-devel@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/oorexx-devel >
_______________________________________________ Oorexx-devel mailing list Oorexx-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/oorexx-devel