IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Feb 28, 2022, 12:14:19 PM (4 years ago)
Author:
eugene
Message:

add string unary functions (isword, isnum, isint, isflt, length)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Ohana/src/opihi/lib.shell/convert_to_RPN.c

    r41341 r42080  
    7171    if (!strcmp (argv[i], "isnan"))  { type = ST_UNARY; goto gotit; }
    7272
     73    /* string-valid unary operations */
     74    if (!strcmp (argv[i], "isword")) { type = ST_UNARY; goto gotit; }
     75    if (!strcmp (argv[i], "isnum"))  { type = ST_UNARY; goto gotit; }
     76    if (!strcmp (argv[i], "isint"))  { type = ST_UNARY; goto gotit; }
     77    if (!strcmp (argv[i], "isflt"))  { type = ST_UNARY; goto gotit; }
     78    if (!strcmp (argv[i], "length")) { type = ST_UNARY; goto gotit; }
     79
    7380    /* binary operations */
     81    // NOTE: I archically use the first character of the function name in a switch to identify the operation
     82    // I should re-work this with an enum which defines the operatino
    7483    if (!strcmp (argv[i], "^"))      { type = ST_POWER; goto gotit; }
    7584
Note: See TracChangeset for help on using the changeset viewer.