F fjsantos Member Licensed User Jun 17, 2008 #1 Hi all. I wonder if it's possible to have an array inside a struct. I mean if i can do something like this... B4X: Dim Type (x, y, value, rotate, status, move(x, y)) Piece(BWIDTH, BHEIGHT) ...or if there are any possibilities to do it. Best Regards, fjsantos. ________ RGV250 Last edited: Jan 24, 2011
Hi all. I wonder if it's possible to have an array inside a struct. I mean if i can do something like this... B4X: Dim Type (x, y, value, rotate, status, move(x, y)) Piece(BWIDTH, BHEIGHT) ...or if there are any possibilities to do it. Best Regards, fjsantos. ________ RGV250
Erel B4X founder Staff member Licensed User Longtime User Jun 17, 2008 #2 This is not possible. Structs are in fact "named" arrays. During compilation structs are converted to arrays by changing the fields names to their corresponding indexes.
This is not possible. Structs are in fact "named" arrays. During compilation structs are converted to arrays by changing the fields names to their corresponding indexes.
F fjsantos Member Licensed User Jun 17, 2008 #3 Ok then. Thanks! Best Regards, fjsantos. ________ silver surfer reviews Last edited: Jan 24, 2011