Path: utzoo!attcan!uunet!lll-winken!lll-tis!helios.ee.lbl.gov!pasteur!ucbvax!VENUS.YCC.YALE.EDU!LEICHTER From: LEICHTER@VENUS.YCC.YALE.EDU ("Jerry Leichter ", LEICHTER-JERRY@CS.YALE.EDU) Newsgroups: comp.os.vms Subject: Re: DCL qualifier parsing Message-ID: <8805260746.AA19083@ucbvax.Berkeley.EDU> Date: 24 May 88 15:42:00 GMT Sender: daemon@ucbvax.BERKELEY.EDU Organization: The Internet Lines: 44 Harvey Rarback (rarback@bnlux0.UUCP) writes: >$ library /extract="2"+"2" fortune.tlb >%DCL-W-PARMDEL, invalid parameter delimiter - check use of special characters Do: $ LIBRARY/EXTRACT="''2+2'" When did you start running VMS V6.0? :-) This doesn't work in any version of VMS I've ever seen, it's actually equiva- lent to the (rather unlikely) command: $ LIBRARY/EXTRACT="+2'" DCL does not have any syntax for specifying expression evaluation at arbitrary places in the input. What it you CAN specify is SUBSTITUTION OF SYMBOLS, a much more limited thing. Expression evaluation occurs in certain well-defined contexts, such as after an "=", ONLY. The original author's problem can be solved easily in two statements: $ value = "2" + "2" $ LIBRARY/EXTRACT="''value'" (or $ LIBRARY/EXTRACT=&value) This is a bizzare example, actually, since I THINK the original author is expecting to extract module 4 - but he will actually get module 22. The "+" is polymorphic; it adds integers, but concatenates strings. In most cases in DCL, the two are freely interchangeable, but here the difference is noticable: $ value = "2" + "2" !Two strings, result "22" $ value = 2 + 2 !Two integers, result 4 $ value = "2" + 2 !String coerced to integer, result 4 If it was indeed "22" that the original author wanted, there is a one-line solution (the point of which is only visible if you use variables): $ X1 = "2" $ X2 = "2" $ LIBRARY/EXTRACT="''X1'''X2'" Concatenation is an implicit side-effect of substitution, so no evaluation is needed. -- Jerry