home *** CD-ROM | disk | FTP | other *** search
/ Merciful 3 / Merciful_Release_3.bin / software / d / draw_studio / drawstudiov1.0.2a.dms / drawstudiov1.0.2a.adf / DSdir1.lha / Rexx / Star5.dsrx < prev    next >
Text File  |  1996-10-29  |  2KB  |  105 lines

  1. /* Allow commands to return results */
  2.  
  3. options results
  4.  
  5. /* On error, goto ERROR:. Comment out this line if you wish to */
  6. /* perform your own error checking. */
  7.  
  8. signal on error
  9.  
  10. 'PROJECT_LOCK'
  11.  
  12. /* BEGIN PROGRAM *************************************************/
  13.  
  14. /*
  15. PROGRAM:     Star5.dsdr
  16. DESCRIPTION:     Draws a 5 pointed start and places it into the clipboard.
  17.         You may then place the start by dragging it
  18.         onto the page.
  19. DATE:        29/10/96
  20. AUTHOR:        Andy Dean
  21. */
  22.  
  23. REDRAW_OFF
  24.  
  25. CREATE_BEZIER CLOSED '0.9755in' '0.3455in' L,
  26.     '0.6176in' '0.3382in' L,
  27.     '0.5in' '0.0in' L,
  28.     '0.3824in' '0.3382in' L,
  29.     '0.0245in' '0.3455in' L,
  30.     '0.3098in' '0.5618in' L,
  31.     '0.2061in' '0.9045in' L,
  32.     '0.5in' '0.7in' L,
  33.     '0.7939in' '0.9045in' L,
  34.     '0.6902in' '0.5618in'
  35. CUT
  36.  
  37. REDRAW_ON
  38.  
  39. PASTE
  40.  
  41. /* END PROGRAM ***************************************************/
  42.  
  43. 'PROJECT_UNLOCK'
  44.  
  45. exit
  46.  
  47. /* On ERROR */
  48.  
  49. ERROR:
  50.  
  51. 'PROJECT_UNLOCK'
  52.  
  53. /* If we get here, either an error occurred with the command's */
  54. /* execution or there was an error with the command itself. */
  55. /* In the former case, rc2 contains the error message and in */
  56. /* the latter, rc2 contains an error number. SIGL contains */
  57. /* the line number of the command which caused the jump */
  58. /* to ERROR: */
  59.  
  60. if datatype(rc2,'NUMERIC') == 1 then do
  61.     /* See if we can describe the error with a string */
  62.  
  63.     select
  64.         when rc2 == 103 then
  65.             err_string = "ERROR 103, "||,
  66.                 "out of memory at line "||SIGL
  67.         when rc2 == 114 then
  68.             err_string = "ERROR 114, "||,
  69.                 "bad command template at line "||SIGL
  70.         when rc2 == 115 then
  71.             err_string = "ERROR 115, "||,
  72.                 "bad number for /N argument at line "||SIGL
  73.         when rc2 == 116 then
  74.             err_string = "ERROR 116, "||,
  75.                 "required argument missing at line "||SIGL
  76.         when rc2 == 117 then
  77.             err_string = "ERROR 117, "||,
  78.                 "value after keywork missing at line "||SIGL
  79.         when rc2 == 118 then
  80.             err_string = "ERROR 118, "||,
  81.                 "wrong number of arguments at line "||SIGL
  82.         when rc2 == 119 then
  83.             err_string = "ERROR 119, "||,
  84.                 "unmatched quotes at line "||SIGL
  85.         when rc2 == 120 then
  86.             err_string = "ERROR 120, "||,
  87.                 "line too long at line "||SIGL
  88.         when rc2 == 236 then
  89.             err_string = "ERROR 236, "||,
  90.                 "unknown command at line "||SIGL
  91.         otherwise
  92.             err_string = "ERROR "||rc2||", at line "||SIGL
  93.         end
  94.     end
  95. else if rc2 == 'RC2' then do
  96.     err_string = "ERROR in command at line "||SIGL
  97.     end
  98. else do
  99.     err_string = rc2||", line "||SIGL
  100.     end
  101.  
  102. req_message TEXT '"'err_string'"'
  103.  
  104. exit
  105.