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,048 of 2,978   
   Heinrich Wolf to All   
   Re: Problem calling Read with two parame   
   12 Feb 06 12:05:56   
   
   From: invalid@invalid.invalid   
      
    schrieb im Newsbeitrag   
   news:1139740103.718309.108810@f14g2000cwb.googlegroups.com...   
   > >I guess you need to type 5a without a whitespace.   
   >   
   > If y type 5a then i get a runtime error.   
   >   
   >>reading a number skips leading whitespaces, but not trailing.   
   > I don't understand this, can you explain this better, with examples?   
   >   
   > Thank you ever so much   
      
   A number may be integer or real.   
   Whitespaces are tab or blank   
   If you want to read a real, you can type "2.5" or "   2.5"   
   with an arbitrary number of leading spaces or tabs.   
   The number is followed by trailing whitespaces,   
   and then by the next value.   
      
   Reading an integer followed by a char   
   seems to be impossible for readln.   
   You get a runtime error   
   if you try to read an integer from "5a".   
   If you type "5 a" on the other hand,   
   readln fetches "5" into the integer   
   and the trailing blank into the char.   
      
   Again I suggest that you read a string in place of the char   
   or in place of the whole input.   
      
   Regards   
   Heiner   
      
   --- 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