I just started from yesterday..very new..
I am trying to calculate "TIME"
I have this problem.
error says " no script following if {$endTimeMin >= 60}"
would you please tell me why it is wrong?
Thank you in advance
---code--
set runTime 150
set b 13:30
set b1 [split $b :]
set b3 [lindex $b1 0]
set b4 [lindex $b1 1]
set runTimeMin [expr int(fmod($runTime,60))]
set runTimeHour [expr int($runTime/60)]
set endTimeHour [expr {$b3+$runTimeHour}]
set endTimeMin [expr {$b4+$runTimeMin}]
#set result3 "$endTimeHour:$endTimeMin"
if {$endTimeMin >= 60}
{
set minFormat [expr int(fmod($endTimeMin,60))]
set hourFormat [expr ($endTimeHour + 1)]
puts "$hourFormat:$minFormat"
#if hourFormat is over 25, 26, 27
if {$hourFormat>=25)
{
set overHour [expr $hourFormat - 24]
set overTimeFormat "$overHour:$minFormat"
puts $overTimeFormat
}
#set realEndTimeFormat "$minFormat:$hourFormat"
}
I am trying to calculate "TIME"
I have this problem.
error says " no script following if {$endTimeMin >= 60}"
would you please tell me why it is wrong?
Thank you in advance
---code--
set runTime 150
set b 13:30
set b1 [split $b :]
set b3 [lindex $b1 0]
set b4 [lindex $b1 1]
set runTimeMin [expr int(fmod($runTime,60))]
set runTimeHour [expr int($runTime/60)]
set endTimeHour [expr {$b3+$runTimeHour}]
set endTimeMin [expr {$b4+$runTimeMin}]
#set result3 "$endTimeHour:$endTimeMin"
if {$endTimeMin >= 60}
{
set minFormat [expr int(fmod($endTimeMin,60))]
set hourFormat [expr ($endTimeHour + 1)]
puts "$hourFormat:$minFormat"
#if hourFormat is over 25, 26, 27
if {$hourFormat>=25)
{
set overHour [expr $hourFormat - 24]
set overTimeFormat "$overHour:$minFormat"
puts $overTimeFormat
}
#set realEndTimeFormat "$minFormat:$hourFormat"
}