Path: utzoo!utgpu!jarvis.csri.toronto.edu!cs.utexas.edu!usc!jarthur!uci-ics!orion.oac.uci.edu!ucsd!ucbvax!CS.ARIZONA.EDU!ralph From: ralph@CS.ARIZONA.EDU ("Ralph Griswold") Newsgroups: comp.lang.icon Subject: Re: questions about records Message-ID: <9001242213.AA21470@megaron.cs.arizona.edu> Date: 24 Jan 90 22:13:41 GMT References: <9001242131.AA05119@zk.cray.com> Sender: daemon@ucbvax.BERKELEY.EDU Distribution: inet Organization: The Internet Lines: 29 Yes, you can have the same field name in different records, and the positions need not be the same, as in record foo(a,b,c) record baz(c,b,a) Icon will handle this properly. Also, as you've observed, the "name spaces" for identifiers and field names are disjoint, so you can, for example, have a local identifier named b and do something like b := foo() . . . b.b := 1 (Not recommended, of course.) And a record need not have any fields, as in record nil() Useful if you need objects of an identifiable type, but the objects have no attributes. Ralph Griswold / Dept of Computer Science / Univ of Arizona / Tucson, AZ 85721 +1 602 621 6609 ralph@cs.arizona.edu uunet!arizona!ralph