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 2,818 of 2,978   
   Wolf Behrenhoff to Rugxulo   
   Re: Arrays of Strings - problem   
   14 Sep 10 22:14:36   
   
   9950b7a1   
   From: nospampleasebutthisisvalid3@gmx.net   
      
   On 14.09.2010 00:41, Rugxulo wrote:   
   > DON'T PANIC!   :-))   
      
   Got a towel? :-)   
      
   > Probably my bad for posting "standard" in the "wrong" newsgroup, heh.   
   > Here's a fixed version:   
   >   
   > procedure skipfield; begin   
   > repeat read(testfile,ch) until ch=','   
   > end;   
      
   Reading character by character might be slow (although there might be   
   some internal buffers). I would rather use ReadLn and parse the string.   
   Because this is FPC, you or the OP could also have a look at the   
   TFileStream class.   
      
   What happens if the "testfile" does not contain a ','? So this lacks   
   basic error handling. Further, you cannot reuse the "skipfield"   
   function. As my last comment, you are using a global variable where it   
   isn't necessary ("ch" is only used in one function).   
      
   Wolf   
      
   --- 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