             index=len;
           }
           for(int i=vstart;i<vstart+vlen;i++)
-              isNumber = (sbuf[i]>='0') && (sbuf[i]<='9') && isNumber;
+          {
+            char c=sbuf[i];
+            isNumber = ((c=='-') || ((c>='0')&&(c<='9'))) && isNumber;
+          }
         }
         else
         while((index<len)
         &&(!((lc(sbuf[index])>='a')&&(lc(sbuf[index])<='z')))
         &&(sbuf[index]!='&'))
         {
-          isNumber = (sbuf[index]>='0') && (sbuf[index]<='9') && isNumber;
+          char c=sbuf[index];
+          isNumber = ((c=='-')||((c>='0') && (c<='9'))) && isNumber;
           vlen++;
           index++;
         }

      {
        memcpy(vbuf,sbuf+vstart,vlen);
        if((vlen > 0)&&(isNumber))
          vval=atol((char *)vbuf);
      }
      
      if(logFileOpen)

        || (lastCmd=='p')||(lastCmd=='P')
        || (lastCmd=='t')||(lastCmd=='T'))
        {
          const char *DMODIFIERS=",lbexprtw+";
          while((index<len)&&(strchr(DMODIFIERS,lc(sbuf[index]))!=null))
            dmodifiers += lc((char)sbuf[index++]);
          vstart=index;
