home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 18 REXX / 18-REXX.zip / orx8.zip / routine_pp.cmd < prev    next >
OS/2 REXX Batch file  |  1997-07-21  |  3KB  |  54 lines

  1. /*
  2. program:   routine_pp.cmd
  3. type:      Object REXX, REXXSAA 6.0
  4. purpose:   filters a string to contain English alphanumeric chars only; embedded non-alphanum chars are
  5.            translated into an underscore ("_")
  6. version:   1.0
  7. date:      1997-04-15
  8. changed:   ---
  9.  
  10. author:    Rony G. Flatscher
  11.            Rony.Flatscher@wu-wien.ac.at
  12.            (Wirtschaftsuniversitaet Wien, University of Economics and Business
  13.            Administration, Vienna/Austria/Europe)
  14. needs:     ---
  15.  
  16. usage:     call or require & see code, resp. comments
  17.            (also, you might copy & paste the code to the desired module, given its size)
  18.  
  19. comments:  prepared for the "8th International Rexx Symposium 1997", April 1997, Heidelberg/Germany
  20.  
  21.  
  22. All rights reserved and copyrighted 1995-1997 by the author, no guarantee that
  23. it works without errors, etc.  etc.
  24.  
  25. You are granted the right to use this module under the condition that you don't charge money for this module (as you didn't write
  26. it in the first place) or modules directly derived from this module, that you document the original author (to give appropriate
  27. credit) with the original name of the module and that you make the unaltered, original source-code of this module available on
  28. demand.  If that holds, you may even bundle this module (either in source or compiled form) with commercial software.
  29.  
  30. If you find an error, please send me the description (preferably a *very* short example);
  31. I'll try to fix it and re-release it to the net.
  32. */
  33.  
  34. /******************************************************************************/
  35. /*                                                                            */
  36. /* name:    pp( object [, [left_bracket] [, right_bracket] ])                 */
  37. /*                                                                            */
  38. /* purpose: make string "prettier"                                            */
  39. /*                                                                            */
  40. /* returns: return object's string-value embedded in brackets                 */
  41. /*                                                                            */
  42. /* remarks: if no brackets are given, defaults to square brackets             */
  43. /*                                                                            */
  44. /* created: rgf, 95-08-23                                                     */
  45.  
  46. :: ROUTINE pp                    PUBLIC
  47.    PARSE ARG argument, left_bracket, right_bracket
  48.    IF left_bracket  = "" THEN left_bracket  = "["       /* default            */
  49.    IF right_bracket = "" THEN right_bracket = "]"       /* default            */
  50.    RETURN left_bracket || argument || right_bracket
  51. /******************************************************************************/
  52.  
  53.  
  54.