On Mon, Aug 19, 2013 at 8:03 PM, Glenn Fowler <g...@research.att.com> wrote: > On Mon, 19 Aug 2013 15:57:15 +0200 Tina Harriott wrote: >> The concept of bool b; (( b.true )) reminds me of java, python and >> other programming languages which tie limits and constants to a >> specific type instead of littering the global namespace with the >> definitions (like C). > >> Could the numeric types, i.e. typeset -i/-E have a similar >> functionality like b.true to access the minimum, maximum, epsilon, ... >> values? > >> For example: > >> typeset -lE i; (( i.MIN )) would be the equivalent to C's LDBL_MIN >> typeset -lE i; (( i.MAX )) would be the equivalent to C's LDBL_MAX >> typeset -lE i; (( i.EPSILON )) would be the equivalent to C's LDBL_EPSILON >> typeset -lE i; (( i.MAX_10_EXP )) would be the equivalent to C's >> LDBL_MAX_10_EXP >> typeset -sE i; (( i.MIN )) would be the equivalent to C's FLT_MIN >> typeset -sE i; (( i.MAX )) would be the equivalent to C's FLT_MAX >> typeset -sE i; (( i.EPSILON )) would be the equivalent to C's FLT_EPSILON >> typeset -sE i; (( i.MAX_10_EXP )) would be the equivalent to C's >> FLT_MAX_10_EXP > > for { FLT INT UINT } could you list the possible names > e.g., ast_float.h currently misses FLT_EPSILON
See http://lists.research.att.com/pipermail/ast-developers/2013q3/003198.html ... it has a prototype patch which works with $(( var.CONST )) and ${var.CONST} and has the list of constants which should be defined by default. ---- Bye, Roland -- __ . . __ (o.\ \/ /.o) roland.ma...@nrubsig.org \__\/\/__/ MPEG specialist, C&&JAVA&&Sun&&Unix programmer /O /==\ O\ TEL +49 641 3992797 (;O/ \/ \O;) _______________________________________________ ast-users mailing list ast-users@lists.research.att.com http://lists.research.att.com/mailman/listinfo/ast-users