查看单个帖子
旧 2007-11-26, 11:17 AM   #1
huangyhg
超级版主
 
huangyhg的头像
 
注册日期: 04-03
帖子: 18592
精华: 36
现金: 249466 标准币
资产: 1080358888 标准币
huangyhg 向着好的方向发展
默认 【转帖】Basic script question

vektor
Hello!
I am making a little script which is reading a text file
and put each line in a variable
my problem is that i want to compare the variables with each other to find the lowest value

Don Ruggieri
In the end, what exactly are you after.

If you are trying to find the lowest value, that is one problem.

From the looks of your code, you are actually trying to sort the data from lowest to highest, that is a different problem.

Do you need to write it out to a file, or is it sufficient to display the lowest value? Do you need to know what position it was in when you read it (relative to the other data)?
__________________
"I ain't as good as I once was, but I'm as good once as I ever was" - Toby Keith
huangyhg离线中   回复时引用此帖
GDT自动化论坛(仅游客可见)