当前位置: 技术问答>linux和unix
awk问题,求教了,似乎判断语句有问题,不能识别两个数相等
来源: 互联网 发布时间:2016-08-30
本文导语: 为什么输出会是 9.37!=9.37 9.37 != 9.37 9.37 time) {//如果换成while ($1 != time)将造成死循环。 time -= min min+=0.01 if(min >= 0.60) { min = 0.00 time+=1.00 } else { time += min } } } if($1 > time) { printf($1 " > " time) } if($1 ...
为什么输出会是
9.37!=9.37
9.37 != 9.37 9.37 time) {//如果换成while ($1 != time)将造成死循环。
time -= min
min+=0.01
if(min >= 0.60) {
min = 0.00
time+=1.00
}
else {
time += min
}
}
}
if($1 > time) {
printf($1 " > " time)
}
if($1 == time) {
printf($1" == " time)
}
if($1 != time) {
printf($1" != " time " ")
}
if($1 = 0.60)
{
min = 0.00
time+=1.00
print "hi1"
}
else {
time += min
print "hi2"
}
}
}
if($1 > time) {printf($1 " > " time)}
if($1 == time) {printf($1" == " time)}
if($1 != time) {printf($1" != " time " ")}
if($1
9.37!=9.37
9.37 != 9.37 9.37 time) {//如果换成while ($1 != time)将造成死循环。
time -= min
min+=0.01
if(min >= 0.60) {
min = 0.00
time+=1.00
}
else {
time += min
}
}
}
if($1 > time) {
printf($1 " > " time)
}
if($1 == time) {
printf($1" == " time)
}
if($1 != time) {
printf($1" != " time " ")
}
if($1 = 0.60)
{
min = 0.00
time+=1.00
print "hi1"
}
else {
time += min
print "hi2"
}
}
}
if($1 > time) {printf($1 " > " time)}
if($1 == time) {printf($1" == " time)}
if($1 != time) {printf($1" != " time " ")}
if($1