Mercurial > projects > ldc
annotate tests/mini/nested9.d @ 1651:cb960b882ca3 tip
bindings were moved to dsource.org/projects/bindings/
author | Moritz Warning <moritzwarning@web.de> |
---|---|
date | Thu, 20 May 2010 20:05:03 +0200 |
parents | 1bb99290e03a |
children |
rev | line source |
---|---|
lindquist@129 | 1 module nested9; |
lindquist@270 | 2 extern(C) int printf(char*, ...); |
lindquist@129 | 3 |
lindquist@129 | 4 void main() |
lindquist@129 | 5 { |
lindquist@129 | 6 int i = 42; |
lindquist@129 | 7 int func() |
lindquist@129 | 8 { |
lindquist@129 | 9 return i + 1; |
lindquist@129 | 10 } |
lindquist@129 | 11 int j = func(); |
lindquist@129 | 12 printf("j = %d\n", j); |
lindquist@129 | 13 assert(j == 43); |
lindquist@129 | 14 } |