home *** CD-ROM | disk | FTP | other *** search
/ PC Online 1996 December / PCO1296.ISO / filesbbs / dos / terminat.arj / SCRIPT.EXE / FUNC.TSL < prev    next >
Encoding:
Text File  |  1995-08-10  |  1.7 KB  |  47 lines

  1. % -----------------------------------------------------------------------------
  2. %  Functions sequence example                          *TERMINATE PRESCRIPTION*
  3. % -----------------------------------------------------------------------------
  4. %
  5. %  Version          : 1.00
  6. %  Filename         : FUNC.TSL
  7. %  Company          : BLOKKER+BLOKKER Software
  8. %  Programmer       : Joop Blokker
  9. %  Module created   : 09-Aug-95
  10. %  Latest revision  : 09-Aug-95
  11. %  Language/version : Terminate Prescription 1.00
  12. %  Remarks          : How to call functions
  13. %
  14. % -----------------------------------------------------------------------------
  15. %
  16. % Functions must be placed in the program listing BEFORE
  17. % they are called. This also should be considered in case
  18. % a function calls an other function. Then 'the other'
  19. % function must be placed before the calling function.
  20. %
  21. % Here is a very simple example of one function calling
  22. % an other function.
  23. %
  24.  
  25. Function TestWaitEnter()               % <─┐
  26.   PrintLn ""                           %   │  empty line
  27.   PrintLn "Press Enter, please"        %   │  message
  28.   WaitEnter                            %   │  wait for Enter key
  29. EndFunc                                %   │
  30.                                        %   │
  31. Function TestAttr(Color)               %   │
  32.   Set SaveColor = GetAttrXY(1,1)       %   │  save attribute
  33.   SetAttr Color                        %   │  change color
  34.   printLn "This is Yellow On Black."   %   │  show it
  35.   SetAttr SaveColor                    %   │  reset attribute
  36.   TestWaitEnter(0)                     % >─┘  call 2nd function
  37. EndFunc
  38.  
  39. % Main program
  40. % ------------
  41.  
  42. ClearScreen
  43. TestAttr(14)                         % test yellow on black text
  44. ClearScreen
  45. TERMINATE
  46.  
  47.