Path: utzoo!mnetor!uunet!husc6!hao!boulder!sunybcs!bingvaxu!leah!itsgw!brspyr1!tim From: tim@brspyr1.BRS.Com (Tim Northrup) Newsgroups: comp.os.vms Subject: Re: Use of RMS from VAX C Message-ID: <2626@brspyr1.BRS.Com> Date: 17 Feb 88 00:04:46 GMT References: <8802150715.AA23998@ucbvax.Berkeley.EDU> Organization: BRS Information Technologies, Latham NY Lines: 35 in article <8802150715.AA23998@ucbvax.Berkeley.EDU>, XPMAINT@TAMVENUS.BITNET (Shane Davis -- CSC XPrint Programmer) says: > > Hello again... > > I'm trying to use the RMS services $PARSE and $SEARCH to process wildcard file > specifications. However, the VAX C compiler (V2.3) flags an error "Invalid > right operand of an &= operator" at this statement: > > file_fab.fab$l_nam=&file_nam; > > --Shane Davis Sounds like the C compiler is accepting old syntax. Try using one of the following: file_fab.fab$l_nam = &file_nam; or file_fab.fab$l_nam = (&file_nam); In older C compilers, the syntax "=+" and "+=" meant the same thing. Nowadays, the accepted standard is "+=", as in "x += 5;" to add 5 to the variable x. The same is true of the bitwise operators, that is "x &= 0x10;" was the same as "x =& 0x10;". The compiler is seeing the line you entered as using this operator, which is not what you meant. You need to force the precedence you desire using one of the lines I show above. (around here we like lots-o-whitespace, so we never run into what you did :-). Hope this helps. -- Tim -- tim@brspyr1.BRS.Com uunet!steinmetz!brspyr1!tim ============================================ Tim "The Enchanter" Northrup