home bbs files messages ]

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

   comp.lang.pascal.borland      Borland Pascal was actually pretty neat      2,978 messages   

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

   Message 1,407 of 2,978   
   Jud McCranie to RadSurfer@yahoo.com   
   Re: Converting Ascii to Int   
   19 Feb 05 19:48:23   
   
   From: youknowwhat.mccranie@adelphia.net   
      
   On Sat, 19 Feb 2005 19:32:20 -0500, Radical NetSurfer   
    wrote:   
      
   >if Val(Str, intVar, errpos) is used, then   
   >all I ever get is   
   >  intVar == 0   
   >and   
   >  errpos = 1,2,3, etc...   
   >   
   >INSTEAD of simply returning a VALID integer   
   >value up to first invalid character found, just like   
   >Qbasic, VBdos, and 'C' would do normally !!   
      
   One work-around is:   
      
   Val(Str, intVar, errpos);   
   if errpos > 0   
     then val( copy( str, 1, errpos), intvar, errpos);   
      
   I think Delphi does it as you would like, but I'm not sure about that.   
      
      
   ---   
   Replace you know what by j to email   
      
   --- 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