amol0010
09-07-2009, 12:09 AM
Hi,
I was wondering how I could reading a set of variables from a text file. The first set of variables are separated by a tab. e.g. 45 and 7.5. Then a newline follows for a fresh set of variables.
e.g. my text file reads as:
45 7.5
50 9.0
60 11.0
I have 2 variables num1 and num2 in an array and then I set the values of nu1 and num2 from the hours and $/hr columns for each iteration.
for e.g. for the first iteration in the for loop, the value of num1=45 and num2=7.5.
For the 2nd loop, num1 = 50 and num2 = 9.0
and so on..
Thanks.
I was wondering how I could reading a set of variables from a text file. The first set of variables are separated by a tab. e.g. 45 and 7.5. Then a newline follows for a fresh set of variables.
e.g. my text file reads as:
45 7.5
50 9.0
60 11.0
I have 2 variables num1 and num2 in an array and then I set the values of nu1 and num2 from the hours and $/hr columns for each iteration.
for e.g. for the first iteration in the for loop, the value of num1=45 and num2=7.5.
For the 2nd loop, num1 = 50 and num2 = 9.0
and so on..
Thanks.