On Fri, Aug 23, 2013 at 3:52 PM, Tina Harriott
<[email protected]> wrote:
> On 23 August 2013 14:38, David Korn <[email protected]> wrote:
>> cc: [email protected] [email protected]
>> Subject: Re: Re: Re: [uwin-developers] [ast-developers] Next alpha/beta and
>> roadmap for ksh93v?
>> --------
>>
>>
>>> Why? How should I construct scripts from that using variables, i.e.
>>> use typeset -s -E svar; printf 'typeset -s -E var; for ((var = %s; var
>>> < %s; var+= %s)); do myfunc var; done' ${svar.MIN} ${svar.MAX}
>>> $((2**24)) | source /dev/stdin
>>>
>>>
>>>
>> svar.MIN and svar.MAX will exist, but only in arithemtic expressions.
>> Thus, $((svar.MIN)) and $((svar.MAX)) instead of ${svar.MIN} ${svar.MAX}.
>> Only constants like PI, NaN, Inf, and others will not exist for each type.
>> The limits would.
>
> I don't understand this. The patch
> astksh20130814_math_constants001.diff.txt already allows MIN, MAX,
> EPSILON etc if they are defined in .sh.mathconst. Why is the
> functionality now restricted to $(())? It just makes it much harder to
> use, if usable at all.
Right. I don't like David's approach either, unless there is a very
damn good justification for castrating numeric constants to $(()) and
not for ${}. Given that Roland's patch works, minus having
preconfigured constants, and can be extended to cover enums (bool is
an enum) I don't see a reason for not taking that patch.
Irek
_______________________________________________
ast-developers mailing list
[email protected]
http://lists.research.att.com/mailman/listinfo/ast-developers