Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!uunet!husc6!cmcl2!rutgers!labrea!jade!ucbvax!VENUS.YCC.YALE.EDU!leichter From: leichter@VENUS.YCC.YALE.EDU ("Jerry Leichter") Newsgroups: comp.os.vms Subject: RE: DCL numeric symbol creation?? Message-ID: <8709120130.AA11423@ucbvax.Berkeley.EDU> Date: Fri, 11-Sep-87 16:27:00 EDT Article-I.D.: ucbvax.8709120130.AA11423 Posted: Fri Sep 11 16:27:00 1987 Date-Received: Sat, 12-Sep-87 21:49:25 EDT Sender: daemon@ucbvax.BERKELEY.EDU Reply-To: "Jerry Leichter" Organization: The ARPA Internet Lines: 31 Does anyone out there know how to create a numeric DCL symbol from a program. Sometimes the string capability is just not right. The only way I have been able to do this so far is to do a $EXIT with a parameter equal to the value I want to set (ORed with %X10000000 to turn off message display). This sets $status with the value I want and I can then use this in succeeding operations. Does anyone know DEC's rationale for not providing this facility? As you surmise, there is no way to do this - the only way to set symbols from a program is with LIB$SET_SYMBOL, and it sets only strings. Providing a rationale for why something ISN'T present is kind of tricky: Any question of this form - "What's DEC's rationale for displaying numeric symbols in SHOW SYMBOL in decimal, octal, and hex - but not in binary?" - can be answered in exactly the same way: Insufficient perceived utility (value) versus excessive implementation effort (cost). Note that even a very small cost may be unjustifiable if there is a sufficiently small perceived value. You say: "Sometimes the string capability is just not right". Why? It's trivial to convert an integer into string form for the call to LIB$SET_SYMBOL, then convert it back to integer form with the F$INTEGER lexical function. Speed and space are not an issue when using DCL - except for rather unusual situations, any design tradeoffs you make are swamped by large fixed costs in DCL anyway. Your example only needs to return a single integer value, and it does so on termination. If this is all you want to do, you can use LIB$DO_COMMAND to execute an appropriate DCL assignment statement. -- Jerry ------