100 ! T R M T Y P . B A S & ! & ! & ! This program is run by the DCL command file & ! TRMTYP.COM. When run,TRMTYP issues the SET & ! TERM Part II directive to get the user's & ! terminal type and return it to the COM file & ! by exiting with the CCL: & ! & ! $ TRMTYP_Val = & 200 ! D i m e n s i o n S t a t e m e n t s & ! & ! & Dim Firqb%(30) & ! Array used for SYS call & 1000 ! M a i n R o u t i n e & ! & ! & On Error Goto 19000 & ! & \ Symbol$ = "TRMTYP_Val" & ! Define DCL symbol name & ! & \ Firqb%(Idx%) = 0% & For Idx% = 1% to 30% & \ Firqb%(0%) = 30% & \ Firqb%(1%) = 6% & \ Firqb%(2%) = 16% & \ Firqb%(3%) = 1% & \ Firqb%(4%) = 255% & ! Set up SET TERM Part II Sys call & ! (Terminal type returned in pos 5) & ! & \ Change Firqb% to Junk$ & \ Change Sys(Junk$) to Firqb% & \ Term.Type$ = Num1$(Firqb%(5%)) & ! Convert array to string & ! Do Sys call & ! Save terminal type as string & 2000 Exit.Cmd$ = "$ " + Symbol$ + & " = " + Term.Type$ & ! Build Exit command & ! & \ Junk$ = Sys(Chr$(14%) + Exit.Cmd$) & \ Stop & ! Exit and execute command & ! Stop (good for nothing) & 19000 ! E r r o r H a n d l e r & ! & ! & Term.Type$ = '""' & \ Resume 2000 & ! Unexpected error & ! Return type as null string & ! Resume to exit & 32767 End