home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!spool.mu.edu!agate!ucbvax!KOPC.HHS.DK!ARNE
- From: ARNE@KOPC.HHS.DK (Arne Vajhxj)
- Newsgroups: comp.os.vms
- Subject: Re: DCL symbols from an image
- Message-ID: <01GSUFHGGK828WWCGW@kopc.hhs.dk>
- Date: 28 Dec 92 08:58:16 GMT
- Sender: daemon@ucbvax.BERKELEY.EDU
- Distribution: world
- Organization: The Internet
- Lines: 39
-
- > I am writing an application which must not only get symbols, but set DCL
- > symbols. I am unable to use the LIB$GET_SYMBOL and LIB$SET_SYMBOL services
- > because I need to be able to work with integers as well. Does anyone have an
- > example (C or MACRO) that does this? I would also like to be able to determine
- > whether the symbol was/is global or local on the get, and to specify global or
- > local on the set.
-
- Integer/string symbols:
-
- You can not set integer symbols via LIB$GET_SYMBOL/LIB$SET_SYMBOL or any
- other unpriviliged code.
-
- But why bother ?
-
- DCL is quite good to autoconvert ! Small example:
-
- $ a=111
- $ sh symb a
- $ b="222"
- $ sh symb b
- $ c=a+b
- $ sh symb c
- $ exit
-
- And yes - LIB$GET_SYMBOL will return a integer symbol defined in DCL as
- a string !
-
- Global/local symbol:
-
- Both LIB$GET_SYMBOL and LIB$SET_SYMBOL have "table-type-indicator" argument,
- which does exactly that !
-
- Arne
-
- Arne Vajhxj local DECNET: KO::ARNE
- Computer Department PSI: PSI%23831001304030::ARNE
- Business School of Southern Denmark Internet: ARNE@KO.HHS.DK
-
-
-