PageRenderTime 23ms CodeModel.GetById 20ms app.highlight 1ms RepoModel.GetById 1ms app.codeStats 0ms

/ m-music-language/src/tests/test_global.m

http://m-music-language.googlecode.com/
Objective C | 31 lines | 25 code | 5 blank | 1 comment | 0 complexity | 41a39391f6888712c07643d425846f28 MD5 | raw file
 1/*	Testing the functionality of global variables in m. */
 2
 3int a;
 4int b;
 5
 6int printa()
 7{
 8	print(a);
 9}
10
11int printb()
12{
13	print(b);
14}
15
16int increment_globals()
17{
18	a++;
19	b++;
20}
21
22void main()
23{
24	a = 42;
25	b = 21;
26	printa();
27	printb();
28	increment_globals();
29	printa();
30	printb();
31}