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,409 of 2,978   
   Jud McCranie to youknowwhat.mccranie@adelphia.net   
   Re: Converting Ascii to Int   
   19 Feb 05 19:58:06   
   
   From: youknowwhat.mccranie@adelphia.net   
      
   On Sat, 19 Feb 2005 19:48:23 -0500, Jud McCranie   
    wrote:   
      
   >Val(Str, intVar, errpos);   
   >if errpos > 0   
   >  then val( copy( str, 1, errpos), intvar, errpos);   
      
   Error, should be:   
      
   ... then val( copy( str, 1, errpos-1), intvar, errpos);   
      
   Or course, you can put this into your own subroutine:   
      
   procedure NewVal( str : string; var IntVar, ErrPos : integer);   
   begin   
   Val(Str, intVar, errpos);   
   if errpos > 0   
    then val( copy( str, 1, errpos-1), intvar, errpos);   
   end;   
      
   ---   
   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