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,613 of 2,978   
   John Smith to John Smith   
   Re: Getting a real number from the keybo   
   26 May 05 21:30:05   
   
   From: assemblywizard@gmail.com   
      
   Let me explain better:   
      
   A real number looks like this:  123.56   
   A real number fits into a variable like this: VAR num;   
   A real number can be used like this:  x := num * 4;   
      
   That string cannot...  VAL does like this...   
   VAL(string, real, integer);   
   and the representation of a number, as a string, in "string" goes into   
   "real" as a real number, the integer is just a flag and reports if the   
   operation was successful and the result of the operation...   
      
   So, after I get the string of digits read into a string with readkey--the   
   real work begins--making it a REAL number...   
   \   
   Warmest regards,   
   John   
   "John Smith"  wrote in message   
   news:Ihxle.185$8f7.7540849@news.sisna.com...   
   > Ok... now how under your example am I supposed to turn that string of   
   > characters into a REAL NUMBER?   
   >   
   > If you know another way to do it without VAL great!!!  But, I DON'T want   
   > the damn string, I want the real NUMBER....  without the use of VAL the   
   > string is WORTHLESS!!!!  Well, unless you know another function to turn   
   > the string to a real number...   
   >   
   > I want to get input a char at a time so I can check and make sure each   
   > keyboard stroke IS a digit (0..9)....   
   >   
   > Take a minute and think man--your post DOES NOT show how to do it, I can   
   > look at it a thousand times and it still will NOT!!!!   
   >   
   > Now, I appreciate your time and energy, but really, lets more on closer to   
   > a real answer to my question....  it is always a joy to find those who   
   > will at least communicate on programming...   
   >   
   > Warmest regards,   
   > John   
   >   
   > "Jim Leonard"  wrote in message   
   > news:1117167394.346369.196750@z14g2000cwz.googlegroups.com...   
   >> John Smith wrote:   
   >>> Now, how can I do that while reading ONE character at a time?   
   >>   
   >> I already posted a working example, minus the "val()" call.  You add   
   >> that yourself.  Please re-read the post I gave where I fix your   
   >> character reading code.   
   >>   
   >   
   >   
      
   --- 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