summaryrefslogtreecommitdiffstats
path: root/src/CBot/TestCBot/TestStatic.txt
blob: f501aa558ebbc492f88d0e6f6bdd5c14dc77c618 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
class ESSAI
{
	int x = 0;
	static int nb = 3;
	static int [ ] array ;

	void	Put( int val)
	{
show(nb);
		array[ nb ] = val;
//		this.nb++;
		this.nb = this.nb + 1;
show(nb, array);
	}
	int		Get( )
	{
		nb--;
show("out", nb, array);
		return array[ nb ] ;
	}
}

extern public void T()
{
	ESSAI	t1 ( ) ; 
	ESSAI	t2 ( ) ; 
	t1.nb++;
	t1.Put( 11 ); t1.Put( 12 ); t2.Put( 13 );

	show ( t1.Get(), t2.Get(), t2.Get() ) ;
}