Category : Miscellaneous Language Source Code
Archive   : OPAL140.ZIP
Filename : MISC.OPL

 
Output of file : MISC.OPL contained in archive : OPAL140.ZIP

{
MISC.OPL, TSF, 11/25/86
OPAL - Miscellaneous Example Program Driver
Copyright (c) 1986, The Software Factory, Inc.
}
{ Modules that make up MISC Demo }
{&include miscwait}
{&include towers, tower}
{&include makeit, chkterm}
{&include critical}
{&include howold}
{&include millions}
{&include hang}
{&include radix}

If !noansi_ Then Do
{
Verify that ANSI.SYS has been installed by issuing a DSR -
Device Status Report
}

Let is_ansi = False
Print('%a','6n')
If Conhit Then
If Congetch(noecho_) = ESC_ & Congetch(noecho_) = Strord('[') Then Do
Conflush
Let is_ansi = True
End

If !is_ansi Then Do
Call System('cls')
Print('System Configuration Error -------%n%n')
Print('ANSI.SYS was not detected on your system.%n%n')
Print('Please install the ANSI.SYS Device Driver in your CONFIG.SYS file before%n')
Print('using this OPAL Demo. Refer to your DOS manual for more information%n')
Print('on how to install ANSI.SYS. The following minimum information is%n')
Print('suggested to operate OPAL efficiently:%n%n')
Print(' FILES=20%n')
Print(' BUFFER=20%n')
Print(' DEVICE=ANSI.SYS%n')
Print(' BREAK=ON <-- Optional%n%n')
Print('Please contact The Software Factory at 214-490-0835 if you need further%n')
Print('assistance.%n%n Thank You.%n%n')
Dos(1)
End
End

Let save_ = False
Let image = 'misc.scr'
Let use_exec = False
Let dummy = ''

Declare(prog, 7, '')

Let prog[1] = 'makeit'
Let prog[2] = 'millions'
Let prog[3] = 'howold'
Let prog[4] = 'hang'
Let prog[5] = 'radix'
Let prog[6] = 'critical'
Let prog[7] = 'towers'

Let menu1 = Defload("misc.mnu")
If adapter_ Then Do
Let chbar_ = '1;33;41m' { Yellow on Red }
Let chdsp_ = '1;37;44m' { White on Blue }
Let helpbar_= '1;37;44m' { White on Blue }
Let datedsp_= '1;37;44m'
Let timedsp_= '1;37;44m'
End

Define wait_wind Form
Border(0, '', 0, 48, 3)
Label (1, 2, Strfmt('%a Press any key to return to the Master Menu %a', chbar_, '0m'))
Field (1, 0, 0, Null_, 0, 0, 1, 'miscwait', @dummy)
End

Let option = 1

Do While True

Let option = Defdisp(menu1, 0, 0, STNOSAVE_, ACWAIT_, option)

Select option

When 0, 8
Do
Let status = Fierase(image)
Dos('%*%nThanks for trying %aOPAL%a%n', '1m', '0m')
End

Otherwise { pick one of the two methods, either will work }
If use_exec
Then Call Exec('Opal',prog[option])
Else Call Opal(true, prog[option])

End { select }

Let status = Defdisp(wait_wind, 21, 16, STPOPUP_, ACWAIT_)

{ reset global variables }
If adapter_ Then Do
Let chbar_ = '1;33;41m' { Yellow on Red }
Let chdsp_ = '1;37;44m' { White on Blue }
Let helpbar_= '1;37;44m' { White on Blue }
End Else Do
Let chbar_ = '1m' { Hilite }
Let chdsp_ = '0m' { Normal }
Let helpbar_= '1m' { Hilite }
End

End { do while true }

End { misc.opl }