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 / Star6.dsrx < prev    next >
Text File  |  1996-10-29  |  2KB  |  107 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:     Star6.dsdr
  16. DESCRIPTION:     Draws a 6 pointed star and places it into the clipboard.
  17.         You may then place the star 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.9330in' '0.2500in' L,
  26.     '0.6in' '0.3268in' L,
  27.     '0.5in' '0.0in' L,
  28.     '0.4in' '0.3268in' L,
  29.     '0.0670in' '0.2500in' L,
  30.     '0.3in' '0.5in' L,
  31.     '0.0670in' '0.7500in' L,
  32.     '0.4in' '0.6732in' L,
  33.     '0.5in' '1.0in' L,
  34.     '0.6in' '0.6732in' L,
  35.     '0.9330in' '0.7500in' L,
  36.     '0.7in' '0.5in'
  37. CUT
  38.  
  39. REDRAW_ON
  40.  
  41. PASTE
  42.  
  43. /* END PROGRAM ***************************************************/
  44.  
  45. 'PROJECT_UNLOCK'
  46.  
  47. exit
  48.  
  49. /* On ERROR */
  50.  
  51. ERROR:
  52.  
  53. 'PROJECT_UNLOCK'
  54.  
  55. /* If we get here, either an error occurred with the command's */
  56. /* execution or there was an error with the command itself. */
  57. /* In the former case, rc2 contains the error message and in */
  58. /* the latter, rc2 contains an error number. SIGL contains */
  59. /* the line number of the command which caused the jump */
  60. /* to ERROR: */
  61.  
  62. if datatype(rc2,'NUMERIC') == 1 then do
  63.     /* See if we can describe the error with a string */
  64.  
  65.     select
  66.         when rc2 == 103 then
  67.             err_string = "ERROR 103, "||,
  68.                 "out of memory at line "||SIGL
  69.         when rc2 == 114 then
  70.             err_string = "ERROR 114, "||,
  71.                 "bad command template at line "||SIGL
  72.         when rc2 == 115 then
  73.             err_string = "ERROR 115, "||,
  74.                 "bad number for /N argument at line "||SIGL
  75.         when rc2 == 116 then
  76.             err_string = "ERROR 116, "||,
  77.                 "required argument missing at line "||SIGL
  78.         when rc2 == 117 then
  79.             err_string = "ERROR 117, "||,
  80.                 "value after keywork missing at line "||SIGL
  81.         when rc2 == 118 then
  82.             err_string = "ERROR 118, "||,
  83.                 "wrong number of arguments at line "||SIGL
  84.         when rc2 == 119 then
  85.             err_string = "ERROR 119, "||,
  86.                 "unmatched quotes at line "||SIGL
  87.         when rc2 == 120 then
  88.             err_string = "ERROR 120, "||,
  89.                 "line too long at line "||SIGL
  90.         when rc2 == 236 then
  91.             err_string = "ERROR 236, "||,
  92.                 "unknown command at line "||SIGL
  93.         otherwise
  94.             err_string = "ERROR "||rc2||", at line "||SIGL
  95.         end
  96.     end
  97. else if rc2 == 'RC2' then do
  98.     err_string = "ERROR in command at line "||SIGL
  99.     end
  100. else do
  101.     err_string = rc2||", line "||SIGL
  102.     end
  103.  
  104. req_message TEXT '"'err_string'"'
  105.  
  106. exit
  107.