home *** CD-ROM | disk | FTP | other *** search
/ Power-Programmierung / CD1.mdf / pascal / library / dos / pibsoft / terminal / showexec.scr < prev    next >
Encoding:
Text File  |  1988-02-26  |  2.4 KB  |  75 lines

  1. ***************************************************************************
  2. *  S H O W E X E C . S C R  ---  Show executing other scripts with args   *
  3. ***************************************************************************
  4. *                                                                         *
  5. *    Script:  ShowExec.Scr                                                *
  6. *                                                                         *
  7. *    Purpose: Show how to execute other scripts with arguments.           *
  8. *                                                                         *
  9. *    Invocation:                                                          *
  10. *                                                                         *
  11. *       Execute "ShowExec"                                                *
  12. *                                                                         *
  13. *    Remarks:                                                             *
  14. *                                                                         *
  15. *       The scripts SHOWEXE1.SCR, SHOWEXE2.SCR, and SHOWEXE3.SCR must be  *
  16. *       present in order to be executed.                                  *
  17. *                                                                         *
  18. ***************************************************************************
  19. *
  20. Declare A String
  21. Declare B Integer
  22. Declare S String
  23. *
  24. Set A = 'Here is parameter A'
  25. Set B = 50
  26. *
  27. Set S = CONCAT( CONCAT( 'A:<' , A ), '>' )
  28. Message S
  29. *
  30. Set S = CONCAT( CONCAT( 'B:<' , STRING( B ) ), '>' )
  31. Message S
  32. *
  33. Message A
  34. Message "Executing script Showexe1 ..."
  35. *
  36. Execute 'showexe1' A B
  37. *
  38. Message "Back to main"
  39. Set S = CONCAT( CONCAT( 'New value of A is <', A ), '>' )
  40. Message S
  41. *
  42. Message "Executing script ShowExe2 ..."
  43. *
  44. Execute 'ShowExe2' B
  45. *
  46. Message "Back to main"
  47. Set S = CONCAT( 'New value of B is ', String( B ) )
  48. Message S
  49. *
  50. Message "Executing script ShowExe3 ..."
  51. *
  52. Execute 'ShowExe3' A
  53. *
  54. Message "Back to main"
  55. *
  56. *     Try executes again, using some constants as arguments.
  57. *
  58. Message A
  59. Message "Executing script ShowExe1 ..."
  60. *
  61. Execute 'ShowExe1' 'Hi there folks!' 50
  62. *
  63. Message "Back to main"
  64. *
  65. Message "Executing script ShowExe2 ..."
  66. *
  67. Execute 'ShowExe2' 20
  68. *
  69. Message "Back to main"
  70. *
  71. Message "Executing script ShowExe3 ..."
  72. *
  73. Execute 'ShowExe3' 'Even more bogus.'
  74. *
  75. Message "Back to main"