nemoinp [parameter=value]
...
Description
nemoinp parses an expression supplied by the user, using the
rules as given by nemoinp(3NEMO)
. The output format can be defined too,
separators, newlines etc. can be choosen at will.
It may come in handy to set an array in a shell variable or to initialize tables, e.g. set x=(`nemoinp 1:10:2`) will then result in x having 1 3 5 7 9. (this is unfortunately different from the matlab convention, where this would be written 1:2:10 instead)
nemoinp 4.2+3.1 simple math
nemoinp 'sqrt(2)' math functions
nemoinp pi+3 some support for funny numbers
nemoinp 2:20:4 from 2 to 20 in steps of 4
set n=20 a C-shell variable
nemoinp 2:${n}:4 as before, now using a shell variable
nemoinp 2::4 repeat the value 4 times
nemoinp 'iflt(1,2,3,4)' print 3, not 4, because 1 is less than 1
AuthorPeter Teuben Update History
18-apr-89 V1.0 created PJT
20-jun-89 V1.0a small changed - doc updated PJT
5-jul-89 V1.1 added nmax parameter PJT
18-may-92 documentation
16-jun-97 V1.6 %d forces integer math PJT
28-aug-00 V1.7 documented tab= and seed= PJT
31-may-01 V1.8 added atof= PJT
4-mar-03 V1.9 added dms= PJT