Re: Re[2]: (Another) (small) Eu 2.5 feature request.
- Posted by Derek Parnell <ddparnell at bigpond.com> Sep 24, 2004
- 472 views
Pete Lomax wrote: > > On Thu, 23 Sep 2004 18:16:29 -0700, Derek Parnell > <guest at RapidEuphoria.com> wrote: > > >However you still have to cater for things like ... > > > > object Temp > > Temp = CurrentCust > > Temp.ZIPCode = 1234 > > But you cannot. > > struct supplier > sequence Name > end struct > "Name"=1 in a supplier context > > <Oh dear, I think I know what you are going to say, but I'll carry on> > > struct customer > integer account_no > sequence Name > end struct > "Name"=2 in a customer context > > object.Name 1 or 2? > > I claim that is not legal, not sensible to resolve dynamically. > <you were, and possibly still are, thinking you could, I suspect> > Named subscripts can only be applied, in the code, to variables > declared of the appropriate type, I claim. I could be wrong. Well that's one interpretation. I was thinking more along the lines that an 'object' variable can contain any other datatype. In effect, when you assign someting to an object, the object 'becomes' the datatype of the assignment. So if you assign a supplier to Temp then Temp 'becomes' a supplier struct until you assign something else to Temp. If you assign a customer to Temp it 'becomes' in effect a customer struct. This is consistent with the current behaviour of object variables. -- Derek Parnell Melbourne, Australia