Description: These are similar to single operator operations, but this can be used with list of variables like here:
      NEG a,b,c
    

    is the same as:
      a:=-a
      b:=-b
      c:=-c
    
  • Syntax:
      NEG a   // is the same as a:=-a
      NOT a   // is the same as a:=~a
      INC a   // is the same as ++a
      DEC a   // is the same as --a
    
  • Description of NEW:
    NEW calls function to allocate a chunk of memory, with size given as below, and writes pointer of this chunk to given variable. If allocation fails, "MEM" exception is raised.
      DEF a:PTR TO obj,b=20,c=3,d:PTR TO DOUBLE
    
      NEW a
      // equals to IF (a:=AllocVec(SIZEOF_obj,MEMF_PUBLIC|MEMF_CLEAR))=NIL THEN Raise("MEM")
    
      NEW a[10]
      // equals to IF (a:=AllocVec(10*SIZEOF_obj,MEMF_PUBLIC|MEMF_CLEAR))=NIL THEN Raise("MEM")
    
      NEW a[b*c+2]
      // equals to IF (a:=AllocVec((b*c+2)*SIZEOF_obj,MEMF_PUBLIC|MEMF_CLEAR))=NIL THEN Raise("MEM")
    
      NEW d[10]
      // equals to IF (d:=AllocVec(10*SIZEOF_DOUBLE,MEMF_PUBLIC|MEMF_CLEAR))=NIL THEN Raise("MEM")
    

    you can also use list of allocations like:
      NEW d[4],a[b]
    
  • Description of END:
    END must be used to deallocate a NEW allocated chunk of memory.
      NEW d[4],a[b]
      ...
      END a,d