Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!uunet!munnari!murdu!u3369429 From: u3369429@murdu.OZ (Michael Bednarek) Newsgroups: comp.os.vms Subject: Re: DCL numeric symbol creation?? Message-ID: <1300@murdu.OZ> Date: Tue, 15-Sep-87 00:14:39 EDT Article-I.D.: murdu.1300 Posted: Tue Sep 15 00:14:39 1987 Date-Received: Thu, 17-Sep-87 01:16:56 EDT References: <8709120130.AA11423@ucbvax.Berkeley.EDU> Followup-To: comp.os.vms Organization: I.A.E.S.R., Melbourne University Lines: 21 Summary: Here comes BINARY In article <8709120130.AA11423@ucbvax.Berkeley.EDU> "Jerry Leichter" writes: > [...] > [quoting very much out of context:] displaying numeric symbols >in SHOW SYMBOL in decimal, octal, and hex - but not in binary? And for anyone who is interested, the trivial procedure BINARY: $! BINARY.COM Translate P1 to binary $ Binary="" $ HexDigs="0123456789ABCDEF" $ BinDigs="0000.0001.0010.0011.0100.0101.0110.0111." - +"1000.1001.1010.1011.1100.1101.1110.1111" $ Hex=F$FAO("!XL",F$Integer(P1)) $ i=-1 $n: $ i=i+1 $ If i.gt.0 then Binary=Binary+"." $ Binary=Binary+F$Element(F$Locate(F$Extract(i,1,Hex),HexDigs),".",BinDigs) $ If i.lt.7 then goto n $ Write SYS$Output P1,"=",Binary