/ 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
- /* Testing the functionality of global variables in m. */
-
- int a;
- int b;
-
- int printa()
- {
- print(a);
- }
-
- int printb()
- {
- print(b);
- }
-
- int increment_globals()
- {
- a++;
- b++;
- }
-
- void main()
- {
- a = 42;
- b = 21;
- printa();
- printb();
- increment_globals();
- printa();
- printb();
- }