[ksh93-integration-discuss] Minimum and maximum values for integervariables?
David Korn
dgk at research.att.com
Sat Aug 25 06:42:39 PDT 2007
Subject: Re: Re: [ksh93-integration-discuss] Minimum and maximum values for integervariables?
--------
> Robert Neville wrote:
> >
> > How can I get the minimum and maximum values for integer variables? Is
> > there a counterpart to limits.h to get these values?
>
> See David Korns answers...
> ... one (long-term) idea may be to add special values to the "getconf"
> builtin to define the minimum and maximum values for "integer", "float",
> the maximum number of array entries and other shell-related limits...
>
> ----
>
> Bye,
> Roland
>
> --
> __ . . __
> (o.\ \/ /.o) roland.mainz at nrubsig.org
> \__\/\/__/ MPEG specialist, C&&JAVA&&Sun&&Unix programmer
> /O /==\ O\ TEL +49 641 7950090
> (;O/ \/ \O;)
In fact the mininum values for integer values are are already
supported.
getconf LLONG_MIN
getconf LLONG_MAX
will give the mininum and maximum values for integer in ksh93.
As of yet there is now max and min values for float (which
is long double).
David Korn
dgk at research.att.com
More information about the ksh93-integration-discuss
mailing list