Re: explain it to me

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

> 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.
CK Lester's solution is fine, but I prefer not to declare object variables
unless absolutely nessecary.
I do this..

rec=value(rec)
rec={rec[2]}

this also works....
rec=rec[2..2]
then there is no need for an object variable..

> 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.
I'd vote for this one..
It has been asked for numerous times..

Chris

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

Search



Quick Links

User menu

Not signed in.

Misc Menu