Path: utzoo!utgpu!water!watmath!clyde!rutgers!gatech!bloom-beacon!tut.cis.ohio-state.edu!uwmcsd1!ig!agate!ucbvax!BRANDEIS.BITNET!SUTTON From: SUTTON@BRANDEIS.BITNET Newsgroups: comp.os.vms Subject: RE: DCL problems Message-ID: <8803271338.AA15277@ucbvax.Berkeley.EDU> Date: 21 Mar 88 16:55:00 GMT Sender: daemon@ucbvax.BERKELEY.EDU Organization: The Internet Lines: 52 The problem you were having has to do with the characteristics of the := operator. The "'s are optional with this kind of assignment. If you leave them out, the equivalence string is converted to upper case, multiple spaces and tabs are reduced to one space and leading and trailing spaces are removed. The & operator is not parsed when it's used on the right side of := or when embedded in a string, but the ' operator is. That is why you got "&P2" (notice that the "p" is uppercase and "count" did get translated correctly). Perhaps DCL skips the second phase of command processing for := statements? The answer to your problem is to use the = and == operators instead. Here's a rewrite: $ p2 = "filename" $ count = 2 $ temp = p'count $ t1 = temp $ show symbol t1 or $ p2 = "filename" $ count = 2 $ show symbol p'count The place to use the & operator is when you need to pass a symbol as part of a "command": $ p2 = "*.*" $ count = 2 $ directory &p'count You know, I remember these rules more by instinct than by rote. Anyway, I stick to using := and :== to make alliases for commands in my LOGIN.COM file: $ dr :== directory/date/protection $ com :== @com:compile.com x . . . SUTTON@BRANDEIS.BITNET P.S. One more tip. If you want to find out if a symbol exists, (that is, if you got to the end of the parameters), say: $ loop1: if f$type(p'count).eqs."" then goto end_loop1 . . . $ count = count+1 $ goto loop1 $ end_loop1: