Page 1 of 1

Table member declaration

Posted: Wed Nov 01, 2023 12:02 am
by NathanH
Hi,

The following code gives a 'variable expected' error.

Code: Select all

s={}
s.to=""
but simply changing the member name from 'to' to 'too' solves the problem. What am I missing?

Code: Select all

s={}
s.too=""
NathanH

Re: Table member declaration

Posted: Wed Nov 01, 2023 3:25 am
by plouf

Re: Table member declaration

Posted: Wed Nov 01, 2023 6:30 pm
by NathanH
Thanks, I was wondering about that because it is a table member not a variable. For example, using the the s["to"] syntax works for addressing it as a table member. Easy fix though, I'll just use s.src and s.dest rather than s.from and s.to. Thanks for the info!

NathanH