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: reading var...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 7 of 7 Topic 1019 of 1118
Post > Topic >>

Re: reading variables from string similar to C function sscanf

by "Heinrich Wolf" <invalid@[EMAIL PROTECTED] > Apr 7, 2007 at 07:25 AM

Hi,

here I type some lines of code.
They are not yet ready to be compiled.
But I'm sure you'll get it to work.

const
  Grid = 'GRID';
var
  s : String;
  p : Integer;
  r1, r2, r3 : extended;

readln(Textfile, s);
p := Pos(Grid, s);
if p > 0 then
  begin
    s := Copy(s, p + length(Grid), length(s));
    val(s, r1, p);
    if p > 0 then
      begin
        s := Copy(s, p, length(s));
        val(s, r2, p);
 




 7 Posts in Topic:
reading variables from string similar to C function sscanf
nils.toenissen@[EMAIL PRO  2007-04-06 12:58:42 
Re: reading variables from string similar to C function sscanf
"winston19842005@[EM  2007-04-06 13:29:34 
Re: reading variables from string similar to C function sscanf
nils.toenissen@[EMAIL PRO  2007-04-06 15:23:25 
Re: reading variables from string similar to C function sscanf
nils.toenissen@[EMAIL PRO  2007-04-06 15:29:52 
Re: reading variables from string similar to C function sscanf
"Jason Burgon"   2007-04-07 10:51:21 
Re: reading variables from string similar to C function sscanf
"winston19842005@[EM  2007-04-06 18:08:32 
Re: reading variables from string similar to C function sscanf
"Heinrich Wolf"  2007-04-07 07:25:51 

Post A Reply:
  Go here to Signup

AddThis Feed Button


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

Contact
tan12V112 Sat Jul 26 0:22:12 CDT 2008.