From: assemblywizard@gmail.com   
      
   Oh, are you a delphi programmer, if so, Delphi probably has automatic "type   
   casting" and will allow you to think a number is a string, or a string is a   
   number... I am writing in REAL Pascal, turbo 7.0...   
      
   Warmest regards,   
   John   
      
   "John Smith" wrote in message   
   news:Xpxle.187$pg7.7545881@news.sisna.com...   
   > ... should have been:   
   > A real number fits into a variable like this: VAR num: real;   
   >   
   > --or-- if {$N+}   
   > VAR num: extended;   
   > --or--   
   > VAR num: comp;   
   >   
   > Warmest regards,   
   > John   
   >   
   > "John Smith" wrote in message   
   > news:jnxle.186$4R6.7475349@news.sisna.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)   
|