home *** CD-ROM | disk | FTP | other *** search
/ BCI NET 2 / BCI NET 2.iso / archives / programming / misc / xref_v1.1.lha / XRef / ARexx / GetEnv < prev    next >
Encoding:
Text File  |  1994-11-30  |  614 b   |  38 lines

  1. /*
  2. ** $PROJECT: arexx external function
  3. **
  4. ** $VER: getenv 0.1 (02.09.94)
  5. **
  6. ** by
  7. **
  8. ** Stefan Ruppert , Windthorststraße 5 , 65439 Flörsheim , GERMANY
  9. **
  10. ** (C) Copyright 1994
  11. ** All Rights Reserved ! 
  12. **
  13. ** FUNCTION
  14. **
  15. ** Get the value of an enviroment variable !
  16. ** Place it in your REXX: directory !
  17. **
  18. ** Don't add any suffix to this file , just use it like this :
  19. **
  20. ** var = GetEnv('WORKBENCH')
  21. **
  22. **
  23. ** $HISTORY:
  24. **
  25. ** 02.09.94 : 000.001 :  initial
  26. */
  27.  
  28. parse arg variable
  29.  
  30. if Open("file","Env:" || variable,"R") then do
  31.    contents = ReadLn("file")
  32.    Call Close("file")
  33.    exit contents
  34. end
  35.    exit ''
  36.  
  37.  
  38.