!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!
! Main driver of plotting and uv analysis procedures
!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!
! Save verify mode
define logical verify
let verify sic%verify
sic verify off
!
! Enable last procedure or task to be called again when go is called alone.
if ("&1none".eq."none") then
   if (true%command.eq." ") then
      let true%command /prompt "Please give a PROCEDURE or TASK name: " /lower
   endif
else
   let true%command "&1" /lower
endif
!
! Execute presumed command
if (sic%program.eq."mapping") then
   if (file("macro#dir:p_'true%command'.greg")) then
      @ p_'true%command'.greg &2 &3 &4 &5 &6 &7 &8 &9
   else if (file("macro#dir:p_'true%command'.map")) then
      @ p_'true%command'.map &2 &3 &4 &5 &6 &7 &8 &9
   else if (file("macro#dir:a-old-'true%command'.cube")) then
      @ a-old-'true%command'.cube &2 &3 &4 &5 &6 &7 &8 &9
   else if (file("macro#dir:c-old-'true%command'.cube")) then
      @ c-old-'true%command'.cube &2 &3 &4 &5 &6 &7 &8 &9
   else if (file("macro#dir:p-old-'true%command'.cube")) then
      @ p-old-'true%command'.cube &2 &3 &4 &5 &6 &7 &8 &9
   else if (file("macro#dir:q-old-'true%command'.cube")) then
      @ q-old-'true%command'.cube &2 &3 &4 &5 &6 &7 &8 &9
   else if (file("macro#dir:p_'true%command'.class")) then
      @ p_'true%command'.class &2 &3 &4 &5 &6 &7 &8 &9
   else if (file("task#dir:'true%command'.exe")) then
      on error continue
      if (sic%window) then
         vector\run 'true%command'
      else
         vector\run 'true%command' /edit
      endif
      on error
   else
      say " "
      say 'bold'" No PROCEDURE or TASK named "'true%command''norm'
      say " Type ""input ?"" to get the list of available commands"
      say " "
   endif
else
   if (file("macro#dir:a-old-'true%command'.cube")) then
      @ a-old-'true%command'.cube &2 &3 &4 &5 &6 &7 &8 &9
   else if (file("macro#dir:c-old-'true%command'.cube")) then
      @ c-old-'true%command'.cube &2 &3 &4 &5 &6 &7 &8 &9
   else if (file("macro#dir:p-old-'true%command'.cube")) then
      @ p-old-'true%command'.cube &2 &3 &4 &5 &6 &7 &8 &9
   else if (file("macro#dir:q-old-'true%command'.cube")) then
      @ q-old-'true%command'.cube &2 &3 &4 &5 &6 &7 &8 &9
   else if (file("macro#dir:p_'true%command'.map")) then
      @ p_'true%command'.map &2 &3 &4 &5 &6 &7 &8 &9
   else if (file("macro#dir:p_'true%command'.class")) then
      @ p_'true%command'.class &2 &3 &4 &5 &6 &7 &8 &9
   else if (file("task#dir:'true%command'.exe")) then
      on error continue
      if (sic%window) then
         vector\run 'true%command'
      else
         vector\run 'true%command' /edit
      endif
      on error
   else
      say " "
      say 'bold'" No PROCEDURE or TASK named "'true%command''norm'
      say " Type ""input ?"" to get the list of available commands"
      say " "
   endif
endif
!
! Restore verify mode
if (verify) then
  sic verify on
endif
!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
