IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 40205


Ignore:
Timestamp:
Nov 8, 2017, 9:54:15 AM (9 years ago)
Author:
eugene
Message:

do not split : into an isolated element unless protected by whitespace; give clearer warning if trinary expression uses unprotected :

Location:
branches/czw_branch/20170908/Ohana/src
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/czw_branch/20170908/Ohana/src/libohana/src/isolate_elements.c

    r40013 r40205  
    171171  // order matches convert_to_RPN.c
    172172  if (!strncmp (c, "?",  1)) return (TRUE);
    173   if (!strncmp (c, ":",  1)) return (TRUE);
     173  // if (!strncmp (c, ":",  1)) return (TRUE);
    174174
    175175  if (!strncmp (c, "^",  1)) return (TRUE);
  • branches/czw_branch/20170908/Ohana/src/opihi/lib.shell/evaluate_stack.c

    r40014 r40205  
    188188          snprintf (line, 512, "syntax error: invalid operand for binary operation: %s or %s\n", stack[i-1].name, stack[i-2].name);
    189189          push_error (line);
     190          if (strchr(stack[i-1].name, ':') || strchr(stack[i-2].name, ':')) {
     191            snprintf (line, 512, "syntax error: invalid operand for binary operation: %s or %s\n(Note that the : in a trinary operation must be protected by spaces)\n", stack[i-1].name, stack[i-2].name);
     192            push_error (line);
     193          }
    190194          clear_stack (&tmp_stack);
    191195          return (FALSE);
Note: See TracChangeset for help on using the changeset viewer.