Path: utzoo!attcan!utgpu!jarvis.csri.toronto.edu!mailrus!csd4.csd.uwm.edu!uxc.cso.uiuc.edu!uxc.cso.uiuc.edu!m.cs.uiuc.edu!s.cs.uiuc.edu!mccaugh From: mccaugh@s.cs.uiuc.edu Newsgroups: comp.lang.c Subject: Re: entry at other than main (was w Message-ID: <207600032@s.cs.uiuc.edu> Date: 22 Aug 89 05:04:00 GMT References: <19173@mimsy.UUCP> Lines: 23 Nf-ID: #R:mimsy.UUCP:19173:s.cs.uiuc.edu:207600032:000:983 Nf-From: s.cs.uiuc.edu!mccaugh Aug 22 00:04:00 1989 /* Written 1:40 pm Aug 20, 1989 by chris@mimsy.UUCP in s.cs.uiuc.edu:comp.lang.c */ Re: the explanation of the second SNOBOL program: > ... At line 4, Z (global) is set to "Y"; at line 5, the variable > named by X---and X is "Z", so this means the global Z---is set to > whatever is named by Z (here the global Y) concatenated with the string > "0", so this sets the global Z to "X0". ..... Well, not quite. Given the program-fragment in question: 2: X = 'Z' 3: Y = 'X' 4: Z = 'Y' 5: $X = $Z '0' The way this was explained led me (and others reading this) to believe that the '$' operator de-referenced Z to produce 'Y'. A clearer explana- tion is that '$' maps the value of variable Z (the string 'Y') to the variable Y; as an r-value, it is then the value of variable Y (= 'X') which is concatenated to '0'. I really don't mean to sound pedantic about this, but one glance at the macro implementation of SNOBOL would show how much is afoot with the '$' operator.