What is wrong with my following code. It wont execute.
$pre_event_date =0;
set halBirthMovie "Jan 12, 1992"
if{$pre_event_date == 0} {
set halBirthMovie [clock format [clock scan $halBirthMovie] -format {%d %b}]
set pre_event_date [clock format [clock scan $pre_event_date] -format {%d %b}]
if{$pre_event_date != $halBirthMovie}{
puts "Not Equal"
}
else{
puts "Equal"
}
}
else{
puts "Nothing"
}
$pre_event_date =0;
set halBirthMovie "Jan 12, 1992"
if{$pre_event_date == 0} {
set halBirthMovie [clock format [clock scan $halBirthMovie] -format {%d %b}]
set pre_event_date [clock format [clock scan $pre_event_date] -format {%d %b}]
if{$pre_event_date != $halBirthMovie}{
puts "Not Equal"
}
else{
puts "Equal"
}
}
else{
puts "Nothing"
}