Re: explain it to me

new topic     » goto parent     » topic index » view thread      » older message » newer message

A sequence can't hold an atom, which is what you are trying to do by
assigning rec[2] to rec.

If you make rec an object, then you can do what you propose.

----- Original Message -----
From: "George Walters" <gwalters at sc.rr.com>
To: "EUforum" <EUforum at topica.com>
Subject: explain it to me


>
> 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
>
>
>

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu