! EDDEFDEV - EDWIN DEFault DEVice routine

%from Imp %include Lognames

%external %integer %fn DEFAULT DEVICE %alias "EDWIN_DEFAULT_DEV"
   %const %string (255) DEFAULT NAME = "EDWIN_DEFAULT_DEVICE"
   %string (127) TERM

   %on 3,4 %start
       ! 3 or 4 => EDWIN_DIR:EDWIN.DAT corrupt / EDWIN_DEFAULT_DEVICE not valid
       %result = 'D'
   %finish

   TERM = TRANSLATE (DEFAULT NAME)
   %if TERM#DEFAULT NAME %start
       %result = STOI (TERM)
   %finish
   %result = 'D'
%end

%end %of %file
