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,629 of 2,978   
   John Smith to All   
   Re: Getting a real number from the keybo   
   27 May 05 14:19:45   
   
   From: assemblywizard@gmail.com   
      
   Yes, we know readln works--it is ONE CHARACTER at a time we want...   
      
   John   
      
   "Charles Appel"  wrote in message   
   news:q2Mle.8924$uR4.1478@newsread2.news.atl.earthlink.net...   
   > program Untitled;   
   > uses crt;   
   >   
   > var   
   >  i: integer;   
   >  s: string[255];   
   >  r: extended;   
   >   
   > begin   
   >  readln(s);   
   >  val(s, r, i);   
   >  writeln('r = ', r:8:8);   
   >  readln;   
   > end.   
   >   
   > Input: 123.45   
   > Output: r = 123.45000000   
   >   
   > Tested in Delphi 5 and Free Pascal.   
   >   
   > --   
   > Charles Appel   
   > "A generation which ignores history has no past - and no future."   
   >      Robert Anson Heinlein   
   >   
   >   
      
   --- 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