# Globale Vereinbarung
set DM_Euro 1.95583

proc dm2euro {dm} {
  global DM_Euro

  set euro [expr $dm/$DM_Euro]
  return $euro
}

label .ldm   -text "DM:"
entry .edm   -textvariable dm -width 10
button .bcomp -text "Umrechnung" \
  -command {set euro [format {%.2f} [dm2euro $dm]]}
label .leuro -text "Euro:"
label .reuro -textvariable euro
button .bexit -text Beenden -command exit
grid .ldm -row 0 -column 0 -sticky w
grid .edm -row 0 -column 1 -sticky w
grid .bcomp -row 0 -column 2 -sticky ew
grid .leuro -row 1 -column 0 -sticky w
grid .reuro -row 1 -column 1 -sticky w
grid .bexit -row 1 -column 2 -sticky ew
