summaryrefslogtreecommitdiffstats
path: root/tests/dimension/directives.pov
diff options
context:
space:
mode:
authorTavian Barnes <tavianator@gmail.com>2010-03-23 17:35:53 -0400
committerTavian Barnes <tavianator@gmail.com>2010-03-23 17:48:37 -0400
commite51389d68ef2e152054d987d7a99930bce180954 (patch)
tree78a59584f7e640e0d077a5d887305e3b5fdba060 /tests/dimension/directives.pov
parent1d441aea4446484342f93fbf315f7f70de8adaf7 (diff)
downloaddimension-e51389d68ef2e152054d987d7a99930bce180954.tar.xz
Implement macro support.
Diffstat (limited to 'tests/dimension/directives.pov')
-rw-r--r--tests/dimension/directives.pov22
1 files changed, 15 insertions, 7 deletions
diff --git a/tests/dimension/directives.pov b/tests/dimension/directives.pov
index 416bbf5..e4721fc 100644
--- a/tests/dimension/directives.pov
+++ b/tests/dimension/directives.pov
@@ -40,18 +40,26 @@
#error "#undef failed"
#end
+#macro Make_Sphere(n)
+ sphere {
+ Center + <0, n, 0>, R
+ pigment {
+ color Color green 1
+ }
+ }
+#end
+
+#macro Inc(n)
+ #declare n = n + 1;
+#end
+
#declare Counter = 0;
#while (Counter < 2)
#if (#if (1 = 1) 0 #end = 0 & !1)
#error "Nested #if parsing failed"
#else
- sphere {
- Center + <0, Counter, 0>, R
- pigment {
- color Color green 1
- }
- }
+ Make_Sphere(Counter)
#end
- #declare Counter = Counter + 1;
+ Inc(Counter)
#end