I consider it a bug since yabasic accepts and executes the code but it behaves quite differently than what the programmer would expect.
Also, the syntax doesn't look quite right, imho, because s.n(1) in the same as s(1).n. I think the first case shouldn't be allowed.
And it can get worst when an element of the struct is itself an array. For example:
struct s(10)
a(10)
end struct
// all cases are accepted and work
s(1).a(1) = 10 // the syntax that imo is correct
s(1,1).a = 20 // both indexes related to s
s.a(1,1) = 30 // both indexes related to n
I think it makes the code less readable and it might be harder for a newbie to even understand structs.
PSnake