home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #31 / NN_1992_31.iso / spool / comp / os / vms / 19944 < prev    next >
Encoding:
Internet Message Format  |  1992-12-28  |  1.5 KB

  1. Path: sparky!uunet!spool.mu.edu!agate!ucbvax!KOPC.HHS.DK!ARNE
  2. From: ARNE@KOPC.HHS.DK (Arne Vajhxj)
  3. Newsgroups: comp.os.vms
  4. Subject: Re: DCL symbols from an image
  5. Message-ID: <01GSUFHGGK828WWCGW@kopc.hhs.dk>
  6. Date: 28 Dec 92 08:58:16 GMT
  7. Sender: daemon@ucbvax.BERKELEY.EDU
  8. Distribution: world
  9. Organization: The Internet
  10. Lines: 39
  11.  
  12. >     I am writing an application which must not only get symbols, but set DCL
  13. > symbols.  I am unable to use the LIB$GET_SYMBOL and LIB$SET_SYMBOL services
  14. > because I need to be able to work with integers as well.  Does anyone have an
  15. > example (C or MACRO) that does this? I would also like to be able to determine
  16. > whether the symbol was/is global or local on the get, and to specify global or
  17. > local on the set.
  18.  
  19. Integer/string symbols:
  20.  
  21. You can not set integer symbols via LIB$GET_SYMBOL/LIB$SET_SYMBOL or any
  22. other unpriviliged code.
  23.  
  24. But why bother ?
  25.  
  26. DCL is quite good to autoconvert ! Small example:
  27.  
  28. $ a=111
  29. $ sh symb a
  30. $ b="222"
  31. $ sh symb b
  32. $ c=a+b
  33. $ sh symb c
  34. $ exit
  35.  
  36. And yes - LIB$GET_SYMBOL will return a integer symbol defined in DCL as
  37. a string !
  38.  
  39. Global/local symbol:
  40.  
  41. Both LIB$GET_SYMBOL and LIB$SET_SYMBOL have "table-type-indicator" argument,
  42. which does exactly that !
  43.  
  44.                                                           Arne
  45.  
  46. Arne Vajhxj                             local DECNET:  KO::ARNE
  47. Computer Department                     PSI:           PSI%23831001304030::ARNE
  48. Business School of Southern Denmark     Internet:      ARNE@KO.HHS.DK
  49.  
  50.  
  51.