Changeset 14708
- Timestamp:
- Aug 30, 2007, 10:57:43 AM (19 years ago)
- File:
-
- 1 edited
-
trunk/Ohana/src/opihi/lib.shell/dvomath.c (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Ohana/src/opihi/lib.shell/dvomath.c
r6250 r14708 3 3 /* return value on success is temp vector/buffer name or scalar value return value on error is NULL, all 4 4 internals freed. errors are sent to error stack. may be printed by calling function */ 5 6 /* XXX this function breaks the elements of the line into objects, numbers, and operators. it 7 * then converts the list to an RPN expresssion. it then evaluates the expression. if an 8 * expression is not a valid math expression (string - string), it results in an error. The 9 * problem is that elements of a valid expression may be invalid as expressions on their own 10 * (eg, string consisting of word-word). this function probably should be somewhat smarter 11 * about breaking down items into strings and objects. for the time being, the user must 12 * protect string items with double quotes for safety. 13 */ 5 14 6 15 char *dvomath (int argc, char **argv, int *size, int validsize) {
Note:
See TracChangeset
for help on using the changeset viewer.
