home bbs files messages ]

Forums before death by AOL, social media and spammers... "We can't have nice things"

   alt.msdos.batch.nt      Fun with Windows NT batch files      68,980 messages   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]

   Message 67,743 of 68,980   
   mokomoji to All   
   Re: leading zero   
   14 May 21 08:37:47   
   
   From: mokomoji@naver.com   
      
   2021년 3월 7일 일요일 오후 12시 19분 45초 UTC+9에 Tom Del   
   Rosso님이 작성한 내용:   
   > This is curious.    
   >    
   > set x=09    
   > set /a y=x    
   >    
   > results in the answer zero, but it should give the invalid number error.    
   >    
   > set /a y=%x%    
   > does give the expected error.    
   >    
   > BTW I like to use    
   > set /a y=(1%x%-100) ...*/-+...    
   > as a compact way to remove the zero.    
   >    
   > --    
   > Defund the Thought Police   
      
      
   Word variable    
   Numeric variable   
      
   word   
   set x="09"   
   num   
   set x=9   
   num 8   
   set x=09   
   num16   
   set x=0x9   
      
   and none type   
   set "x=09"   
      
      
   Change from simple "word" to "decimal numeric"   
      
   set "x=09"   
   set "y=1%x%"   
   set /a "y=%y%-100"   
      
   --- SoupGate-Win32 v1.05   
    * Origin: you cannot sedate... all the things you hate (1:229/2)   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]


(c) 1994,  bbs@darkrealms.ca