home *** CD-ROM | disk | FTP | other *** search
/ Club Amiga de Montreal - CAM / CAM_CD_1.iso / files / 420.lha / RexxutilLibraryB_v33.159 / env.rexx next >
Encoding:
OS/2 REXX Batch file  |  1990-10-02  |  837 b   |  35 lines

  1. /* Simple test for rexxutil.library 33.23 (BETA)
  2.  *
  3.  * rexxutil.library is an ARexx function host that adds clipboard access,
  4.  * environment variables, and other misc. utility to the ARexx language.
  5.  *
  6.  * Written by David N. Junod
  7.  */
  8.  
  9. /* Load the ARexx utility library */
  10. IF ~SHOW('L','rexxutil.library') THEN
  11.    CALL ADDLIB('rexxutil.library',0,-30)
  12.  
  13.    /* Manipulate environment variables.  Under AmigaOS 2.0, these commands
  14.     * also support the GLOBAL or LOCAL switches */
  15.  
  16.    SAY "Get 'username'"
  17.    User = GetVar('username')
  18.    IF User > ""
  19.    THEN DO
  20.     SAY "UserName = ["user"]"
  21.     END
  22.    ELSE DO
  23.     SAY "Can't get username"
  24.     SAY "Set 'username' to davidj"
  25.     CALL SetVar('username','davidj')
  26.     END
  27.  
  28.    SAY "Get 'username' again"
  29.    user = GetVar('username')
  30.    SAY 'UserName = ['user']'
  31.  
  32.    SAY "TmpFile = " TmpFile("T:Testing")
  33.  
  34. EXIT
  35.