home *** CD-ROM | disk | FTP | other *** search
- % -----------------------------------------------------------------------------
- % Functions sequence example *TERMINATE PRESCRIPTION*
- % -----------------------------------------------------------------------------
- %
- % Version : 1.00
- % Filename : FUNC.TSL
- % Company : BLOKKER+BLOKKER Software
- % Programmer : Joop Blokker
- % Module created : 09-Aug-95
- % Latest revision : 09-Aug-95
- % Language/version : Terminate Prescription 1.00
- % Remarks : How to call functions
- %
- % -----------------------------------------------------------------------------
- %
- % Functions must be placed in the program listing BEFORE
- % they are called. This also should be considered in case
- % a function calls an other function. Then 'the other'
- % function must be placed before the calling function.
- %
- % Here is a very simple example of one function calling
- % an other function.
- %
-
- Function TestWaitEnter() % <─┐
- PrintLn "" % │ empty line
- PrintLn "Press Enter, please" % │ message
- WaitEnter % │ wait for Enter key
- EndFunc % │
- % │
- Function TestAttr(Color) % │
- Set SaveColor = GetAttrXY(1,1) % │ save attribute
- SetAttr Color % │ change color
- printLn "This is Yellow On Black." % │ show it
- SetAttr SaveColor % │ reset attribute
- TestWaitEnter(0) % >─┘ call 2nd function
- EndFunc
-
- % Main program
- % ------------
-
- ClearScreen
- TestAttr(14) % test yellow on black text
- ClearScreen
- TERMINATE
-
-