RE: explain it to me
- Posted by Brian Broker <bkb at cnw.com> Aug 29, 2001
- 419 views
George, I can only assume that you are declaring the variable rec as an object in your example, otherise you would get an error at: rec = value( rec ) because now rec is holding the atom 123.45 Now that rec is an atom, there is no such thing as rec[2]. I'm not sure what you are trying to get so let me take a stab at it. Are you trying to get rec to hold an atom with a value of 2? If so, try: rec = value( rec[2] ) -- Brian George Walters wrote: > Could someone explain why I can't reassign a sequence like this > > rec = "123.45" > > rec = value(rec) > rec = rec[2] -- why can't I redefine rec this way if I don't > want the 1st element (or any > others but the 2nd). It's awfully > inconvinent to have to go > through a temp var > everytime. > > And I would have thought that the following syntax would have also been > allowed > > rec = value(rec)[2] -- this is valid in Theos Basic and seems > logical to me here also. It saves going through a temp var also. > > ...george > >