expr ( fr )Dernière modification : 2013/01/26 19:17 


Index / Changements récents / Informations / Forum / Télécharger / Contact  Éditer 
expr is the standard way to evaluate arithmetic expressions.
expr can recognize the 4 main operators (+, , *, /) and % (the mod operator that return the reminder of the division of two integer), and power operator . As it is in KSH the syntax is very strict. first, if you only need to print the result of an operation just write it like that:
Important notice: you must not forget the spaces between the operator and the operands. If you need to make operations on variables you have to use the ((...)) syntax:
Since there are so few operators, it is possible to switch to an enhanced arithmetic expressions evaluator: bc.


Wiki utilisant PumaWiki 1.0
2024/10/04 20:37  fr  44.222.134.250 