home *** CD-ROM | disk | FTP | other *** search
/ drawSTUDIO / drawSTUDIO.iso / english / drawstudiofpu / rexx / star7.dsrx < prev    next >
Encoding:
Text File  |  1996-11-05  |  2.5 KB  |  109 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:     Star7.dsdr
  16. DESCRIPTION:     Draws a 7 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.8909in' '0.1883in' L,
  26.     '0.5868in' '0.3198in' L,
  27.     '0.5in' '0.0in' L,
  28.     '0.4132in' '0.3198in' L,
  29.     '0.1091in' '0.1883in' L,
  30.     '0.3050in' '0.4555in' L,
  31.     '0.0125in' '0.6113in' L,
  32.     '0.3436in' '0.6247in' L,
  33.     '0.2831in' '0.9505in' L,
  34.     '0.5in' '0.7in' L,
  35.     '0.7169in' '0.9505in' L,
  36.     '0.6564in' '0.6247in' L,
  37.     '0.9875in' '0.6113in' L,
  38.     '0.6950in' '0.4555in'
  39. CUT
  40.  
  41. REDRAW_ON
  42.  
  43. PASTE
  44.  
  45. /* END PROGRAM ***************************************************/
  46.  
  47. 'PROJECT_UNLOCK'
  48.  
  49. exit
  50.  
  51. /* On ERROR */
  52.  
  53. ERROR:
  54.  
  55. 'PROJECT_UNLOCK'
  56.  
  57. /* If we get here, either an error occurred with the command's */
  58. /* execution or there was an error with the command itself. */
  59. /* In the former case, rc2 contains the error message and in */
  60. /* the latter, rc2 contains an error number. SIGL contains */
  61. /* the line number of the command which caused the jump */
  62. /* to ERROR: */
  63.  
  64. if datatype(rc2,'NUMERIC') == 1 then do
  65.     /* See if we can describe the error with a string */
  66.  
  67.     select
  68.         when rc2 == 103 then
  69.             err_string = "ERROR 103, "||,
  70.                 "out of memory at line "||SIGL
  71.         when rc2 == 114 then
  72.             err_string = "ERROR 114, "||,
  73.                 "bad command template at line "||SIGL
  74.         when rc2 == 115 then
  75.             err_string = "ERROR 115, "||,
  76.                 "bad number for /N argument at line "||SIGL
  77.         when rc2 == 116 then
  78.             err_string = "ERROR 116, "||,
  79.                 "required argument missing at line "||SIGL
  80.         when rc2 == 117 then
  81.             err_string = "ERROR 117, "||,
  82.                 "value after keywork missing at line "||SIGL
  83.         when rc2 == 118 then
  84.             err_string = "ERROR 118, "||,
  85.                 "wrong number of arguments at line "||SIGL
  86.         when rc2 == 119 then
  87.             err_string = "ERROR 119, "||,
  88.                 "unmatched quotes at line "||SIGL
  89.         when rc2 == 120 then
  90.             err_string = "ERROR 120, "||,
  91.                 "line too long at line "||SIGL
  92.         when rc2 == 236 then
  93.             err_string = "ERROR 236, "||,
  94.                 "unknown command at line "||SIGL
  95.         otherwise
  96.             err_string = "ERROR "||rc2||", at line "||SIGL
  97.         end
  98.     end
  99. else if rc2 == 'RC2' then do
  100.     err_string = "ERROR in command at line "||SIGL
  101.     end
  102. else do
  103.     err_string = rc2||", line "||SIGL
  104.     end
  105.  
  106. req_message TEXT '"'err_string'"'
  107.  
  108. exit
  109.