And it is also available to USERS of the class as well. So rather than
needing to remember a particular value to be passed into a method or return
values, the class itself can define named constants.

But this is beside the point, because ::CONSTANT already exists and has
proven to be useful. The only change here is an expansion on how the
constants can be defined. The TwoThirdsPi case is an excellent example. To
do that with the current directive, one would have to manually make the
calculation using the value for pi, then type that number on to a separate
::CONSTANT directive. I've encountered a number of situations where I've
had to do a manual calculation to define constants where being able to use
an expression would have made the definition a lot simplier.

Rick

On Wed, Dec 19, 2018 at 3:39 AM Erich Steinböck <erich.steinbo...@gmail.com>
wrote:

> what is the difference between ::constant pi and pi
>>
> Hi P.O.,
> the difference is scope. ::constant pi is available to all methods of the
> class where it is declared, whereas pi is only available to the code within
> the method which defines it.
>
>> _______________________________________________
> 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

Reply via email to