Mailing List Archive: 49091 messages
  • Home
  • Script library
  • AltME Archive
  • Mailing list
  • Articles Index
  • Site search
 

[REBOL] Binding operators

From: karlr20:home at: 8-Sep-2001 10:06

When using bind on code with operators (and, xor, etc) the operators *sometimes* cause a script error. Below is code which demonstrates the problem. Can anyone explain this? REBOL [ Purpose: {Shows inconsistent behavior of re-binding operators.} ] c: context [ and: 16 reportA: func [ n ] [ print n ] reportB: func [ n x ] [ print n ] reportC: func [ x n ] [ print n ] run: func [ prog ] [ do bind load prog 'run ] ] c/run [ reportA and reportB and 1 reportC 1 and ; Why does this fail? ] quit ouput: { 16 16 ** Script Error: Invalid operator: and ** Where: run ** Near: reportC 1 and } -Karl Robillard