set form_def {
  GuidoForm form {
    -label "GuidoField Form"
    -default_buttons

    GuidoField bearing {
      -label "Enter a bearing"
      -format float
      -width 10
      -low_bound 0
      -high_bound 360
      -null false
    }
  }
}
SclCreateGuidoForm form_handle $form_def {}
$form_handle SclRun {}

if {$bearing > 45 && $bearing <= 135} {
  puts "The direction is East"
} elseif {$bearing > 135 && $bearing <= 225} {
  puts "The direction is South"
} elseif {$bearing > 225 && $bearing <= 315} {
  puts "The direction is West"
} elseif {$bearing > 315 && $bearing <= 360 ||
          $bearing >=  0 && $bearing <= 45} {
  puts "The direction is North"
}
