read text

Ricardo Raposo rraposo at INMET.GOV.BR
Wed Dec 13 13:06:12 EST 2006


Hi Lorna

You can make by this way:

flag=1
i=1
while(flag!=2)
    file = read(data.txt)
    line = sublin(file,2)
    value.i = subwrd(line,1)
    flag = sublin(file,1)
    flag = subwrd(flag,1)
    i=i+1
endwhile

Best regards

Ricardo Raposo

----- Original Message -----
From: "lorna nayagam" <lorna_arn at YAHOO.COM>
To: <GRADSUSR at LIST.CINECA.IT>
Sent: Wednesday, December 13, 2006 10:10 AM
Subject: read text


> Hello gradsusers,
>
> I have a text file containing 600 values in a file
> data.txt. the contents of the file is like (single
> column, 600 lines)
>
> 300.992
> 299.981
> 289.237
> .......
> .......
> .......
>
>
> I want to read the lines from the text file and assign
> them as follows.
> x1=300.992
> x2=299.981
> ..........
> x600=.....
>
>
> can anybody help me? how to do this? i want to take
> them after calling x1, x2, ..... and do calculations.
> Kindly give a suggestion.
> thanks,
> lorna
>
> Ms. Lorna R. Nayagam,
> Junior Research Fellow,
> Department of Atmospheric Sciences,
> Cochin University of Science and Technology,
> Finearts Avenue, Cochin 682016
>
>
>
>
> ____________________________________________________________________________________
> Do you Yahoo!?
> Everyone is raving about the all-new Yahoo! Mail beta.
> http://new.mail.yahoo.com
>



More information about the gradsusr mailing list