2010/11/19 Demosthenes Koptsis <demosthen...@gmail.com>:
> as i think it now
>
> the word STATIC is not for declaration static arrays but
>
> If the STATIC keyword is specified, the same variable will be shared
> with every object of this class.
>
> i get this from variable syntax, same for arrays which they are a set of
> variables.
>
> A static array is declared as
>
> PRIVATE TicTacToe[3] AS Integer
> STATIC PRIVATE TicTacToe[3] AS Integer
>
> A dynamic arrays is declared as
>
> DIM TicTacToe AS Integer[3]
> DIM TicTacToe AS Integer[]
> DIM TicTacToe AS NEW Integer[]
> PUBLIC TicTacToe AS Integer[3]
> PUBLIC TicTacToe AS Integer[]
> PRIVATE TicTacToe AS Integer[3]
>
> am i right Fabien?
yes

For the other question

in internal when you wrote :
dim tictactoe as interger[3]
gambas do :
Dim TicTacToe as New Integer[]
TicTacToe.resize(3)


When you wrote

Dim TicTacToe as Integer[]
You have give a type to TicTacToe but you need then to instanciate a
new array and assing it to this variable
by

TicTacToc = New Integer[]


A dynamic array is an object you can pass it throught procedure byref
and between classes ... it's really powerfull.. it's an object :)

------------------------------------------------------------------------------
Beautiful is writing same markup. Internet Explorer 9 supports
standards for HTML5, CSS3, SVG 1.1,  ECMAScript5, and DOM L2 & L3.
Spend less time writing and  rewriting code and more time creating great
experiences on the web. Be a part of the beta today
http://p.sf.net/sfu/msIE9-sfdev2dev
_______________________________________________
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user

Reply via email to