POV-Ray : Newsgroups : povray.general : Is this a bug, or am I missing something? : Is this a bug, or am I missing something? Server Time
19 Nov 2024 07:28:58 EST (-0500)
  Is this a bug, or am I missing something?  
From: Shay
Date: 3 Apr 2002 12:12:37
Message: <3cab3805$1@news.povray.org>
I will post this in bug-reports if it turns out to be a bug, but I often
miss obvious things when looking at my own code. Which is the case here?

The expected result of the following code (expected by me, at least) would
be:
2
2
2

Instead, the code returns
2
3
4

I send an identical array to the macro each time, but get a different
result.

???????????

#macro Persistence_Of_Dimension (ARRAY)
 #local Array_Size = dimension_size (ARRAY, 1) + 1;
 #local ARRAY = array[Array_Size]

 #write (Test_Out, Array_Size, "\n")
#end // #macro Persistence_Of_Dimension (ARRAY)


#local Test_Array = array[1] {0}

#fopen Test_Out "Test_Out.inc" write
Persistence_Of_Dimension (Test_Array)
Persistence_Of_Dimension (Test_Array)
Persistence_Of_Dimension (Test_Array)
#fclose Test_Out

 -Shay


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.