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 / BurstSmall.dsrx < prev    next >
Text File  |  1996-10-31  |  3KB  |  113 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:     BurstSmall.dsdr
  16. DESCRIPTION:     Draws a small "burst" shape and places it into the
  17.         clipboard.
  18.         You may then place the shape by dragging it
  19.         onto the page.
  20. DATE:        29/10/96
  21. AUTHOR:        Andy Dean
  22. */
  23.  
  24. REDRAW_OFF
  25.  
  26. CREATE_BEZIER CLOSED 0.587in 0.0in L,
  27.     0.597in 0.381in L,
  28.     0.804in 0.202in L,
  29.     0.689in 0.473in L,
  30.     1.000in 0.480in L,
  31.     0.699in 0.615in L,
  32.     0.804in 0.994in L,
  33.     0.555in 0.684in L,
  34.     0.425in 0.991in L,
  35.     0.389in 0.678in L,
  36.     0.105in 0.882in L,
  37.     0.293in 0.539in L,
  38.     0.000in 0.308in L,
  39.     0.326in 0.374in L,
  40.     0.329in 0.037in L,
  41.     0.451in 0.348in
  42.  
  43. CUT
  44.  
  45. REDRAW_ON
  46.  
  47. PASTE
  48.  
  49. /* END PROGRAM ***************************************************/
  50.  
  51. 'PROJECT_UNLOCK'
  52.  
  53. exit
  54.  
  55. /* On ERROR */
  56.  
  57. ERROR:
  58.  
  59. 'PROJECT_UNLOCK'
  60.  
  61. /* If we get here, either an error occurred with the command's */
  62. /* execution or there was an error with the command itself. */
  63. /* In the former case, rc2 contains the error message and in */
  64. /* the latter, rc2 contains an error number. SIGL contains */
  65. /* the line number of the command which caused the jump */
  66. /* to ERROR: */
  67.  
  68. if datatype(rc2,'NUMERIC') == 1 then do
  69.     /* See if we can describe the error with a string */
  70.  
  71.     select
  72.         when rc2 == 103 then
  73.             err_string = "ERROR 103, "||,
  74.                 "out of memory at line "||SIGL
  75.         when rc2 == 114 then
  76.             err_string = "ERROR 114, "||,
  77.                 "bad command template at line "||SIGL
  78.         when rc2 == 115 then
  79.             err_string = "ERROR 115, "||,
  80.                 "bad number for /N argument at line "||SIGL
  81.         when rc2 == 116 then
  82.             err_string = "ERROR 116, "||,
  83.                 "required argument missing at line "||SIGL
  84.         when rc2 == 117 then
  85.             err_string = "ERROR 117, "||,
  86.                 "value after keywork missing at line "||SIGL
  87.         when rc2 == 118 then
  88.             err_string = "ERROR 118, "||,
  89.                 "wrong number of arguments at line "||SIGL
  90.         when rc2 == 119 then
  91.             err_string = "ERROR 119, "||,
  92.                 "unmatched quotes at line "||SIGL
  93.         when rc2 == 120 then
  94.             err_string = "ERROR 120, "||,
  95.                 "line too long at line "||SIGL
  96.         when rc2 == 236 then
  97.             err_string = "ERROR 236, "||,
  98.                 "unknown command at line "||SIGL
  99.         otherwise
  100.             err_string = "ERROR "||rc2||", at line "||SIGL
  101.         end
  102.     end
  103. else if rc2 == 'RC2' then do
  104.     err_string = "ERROR in command at line "||SIGL
  105.     end
  106. else do
  107.     err_string = rc2||", line "||SIGL
  108.     end
  109.  
  110. req_message TEXT '"'err_string'"'
  111.  
  112. exit
  113.