Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Programming > Pascal Borland > Re: Comparing s...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 3 of 9 Topic 1048 of 1118
Post > Topic >>

Re: Comparing strings and numbers

by Dr J R Stockton <jrs@[EMAIL PROTECTED] > Aug 28, 2007 at 11:39 PM

In comp.lang.pascal.borland message <1188326227.893577.83760@[EMAIL PROTECTED]
>, Tue, 28 Aug 2007 18:37:07, cmakal
<cmakalinaw@[EMAIL PROTECTED]
> posted:

>and I wanted to search it to find all values between 1 and 40.

while not EoF(F) do begin
  Readln(F, S) ;
  Val(S, X, N) ;
  if N<>0 then continue;
  if (X<=1) and (X>=40) continue ;
  Inc(J) ; A[J] := X ;
  end ;
{ untested, but about right; can be shortened }

-- 
 (c) John Stockton, Surrey, UK.   ?@[EMAIL PROTECTED]
   Turnpike v6.05  
MIME.
  <URL:http://www.merlyn.demon.co.uk/>
TP/BP/Delphi/&c., FAQqy topics &
links;
  <URL:http://www.merlyn.demon.co.uk/clpb-faq.txt>
  RAH Prins : c.l.p.b
mFAQ;
  <URL:ftp://garbo.uwasa.fi/pc/link/tsfaqp.zip> Timo Salmi's Turbo Pascal
FAQ.
 




 9 Posts in Topic:
Comparing strings and numbers
cmakal <cmakalinaw@[EM  2007-08-28 18:37:07 
Re: Comparing strings and numbers
Femme Verbeek <fv@[EMA  2007-08-29 00:13:44 
Re: Comparing strings and numbers
Dr J R Stockton <jrs@[  2007-08-28 23:39:32 
Re: Comparing strings and numbers
Wolf Behrenhoff <NoSpa  2007-08-29 02:11:08 
Re: Comparing strings and numbers
Dr J R Stockton <jrs@[  2007-08-29 22:31:05 
Re: Comparing strings and numbers
Wolf Behrenhoff <NoSpa  2007-08-30 01:45:30 
Re: Comparing strings and numbers
"Jochen" <jo  2007-08-30 02:25:33 
Re: Comparing strings and numbers
cmakal <cmakalinaw@[EM  2007-08-30 16:05:56 
Re: Comparing strings and numbers
Dr J R Stockton <jrs@[  2007-08-30 19:12:23 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Fri Jul 25 18:36:24 CDT 2008.