POV-Ray : Newsgroups : povray.general : 3.1 beta4 macro 'bug' Server Time
16 Nov 2024 15:18:44 EST (-0500)
  3.1 beta4 macro 'bug' (Message 1 to 4 of 4)  
From: ir  R M A  Wieringa
Subject: 3.1 beta4 macro 'bug'
Date: 7 Jul 1998 08:38:18
Message: <35A208B4.DC0A98A@natlab.research.philips.com>
The following macro, and its application, cause POV 3.1 to generate 
a warning:

   #macro plus(X,Y)
     X+Y
   #end

   sphere { <0,0,0>, plus(3,4) pigment { color <1,1,1> } }

The warning reads:

All #version and #declares of float, vector, and color require 
semi-colon ';' at end.

Apparently not what one wants.

Regards,  RobW
-- 
+------------------------------------------------------+
| Rob Wieringa                                         |
| Philips  Research  Laboratories   Eindhoven          |
| <remove _XXXXX_ from email address..>                |
| email: _XXX### [at] natlabresearchphilipscom   |
+------------------------------------------------------+


Post a reply to this message

From: K  Tyler
Subject: Re: 3.1 beta4 macro 'bug'
Date: 7 Jul 1998 14:16:14
Message: <35A2496D.8DBBD829@pacbell.net>
I rendered your statements exactly as listed below with only
the addition of a camera. The warning did not appear. ???
Perhaps something  else where in the scene or one of your
include files is tripping the warning.
I got the same message when I included an older colors inc file.


ir. R.M.A. Wieringa wrote:

> The following macro, and its application, cause POV 3.1 to generate
> a warning:
>
>    #macro plus(X,Y)
>      X+Y
>    #end
>
>    sphere { <0,0,0>, plus(3,4) pigment { color <1,1,1> } }
>
> The warning reads:
>
> All #version and #declares of float, vector, and color require
> semi-colon ';' at end.
>
> Apparently not what one wants.
>
> Regards,  RobW
> --
> +------------------------------------------------------+
> | Rob Wieringa                                         |
> | Philips  Research  Laboratories   Eindhoven          |
> | <remove _XXXXX_ from email address..>                |
> | email: _XXX### [at] natlabresearchphilipscom   |
> +------------------------------------------------------+


Post a reply to this message

From: Dan Connelly
Subject: Re: 3.1 beta4 macro 'bug'
Date: 7 Jul 1998 18:45:53
Message: <35A296FC.AE6A94D9@flash.net>
I don't know about the bug, but I would have
written the macro as follows:

#macro plus(X,Y)
   (X+Y)
#end

to avoid operator binding ambiguities.


K. Tyler wrote:
> 
> I rendered your statements exactly as listed below with only
> the addition of a camera. The warning did not appear. ???
> Perhaps something  else where in the scene or one of your
> include files is tripping the warning.

> 
> > The following macro, and its application, cause POV 3.1 to generate
> > a warning:
> >
> >    #macro plus(X,Y)
> >      X+Y
> >    #end

-- 
http://www.flash.net/~djconnel/


Post a reply to this message

From: ir  R M A  Wieringa
Subject: Re: 3.1 beta4 macro 'bug'
Date: 9 Jul 1998 03:07:54
Message: <35A45E4B.22AA425F@natlab.research.philips.com>
Sorry for creating this confusion.
I got the warning in a complex recursive tree specification, built with 
macros, and tried to replicate it in a spec as simple as possible.
In the example spec the line 

#version 3.1

occurred, causing a warning which I mistook for the mentioned one.
The 'real' warning was produced by a line like:

   #local seven = plus(3,4)

in which indeed a semicolon is missing.
The warning however refers to the line in which the macro is defined, 
which makes it hard (in large specs) to find the error (as I
demonstrated ;-)  )

Try this for a change:

   #macro plus(X,Y)
     (X+Y)
   #end
   sphere { <0,0,0>, 1 pigment { color <1,1,1> } }
   #local seven = plus(3,4)



K. Tyler wrote:
> 
> I rendered your statements exactly as listed below with only
> the addition of a camera. The warning did not appear. ???
> Perhaps something  else where in the scene or one of your
> include files is tripping the warning.
> I got the same message when I included an older colors inc file.
> 
> ir. R.M.A. Wieringa wrote:
> 
> > The following macro, and its application, cause POV 3.1 to generate
> > a warning:
> >
> >    #macro plus(X,Y)
> >      X+Y
> >    #end
> >
> >    sphere { <0,0,0>, plus(3,4) pigment { color <1,1,1> } }
> >
> > The warning reads:
> >
> > All #version and #declares of float, vector, and color require
> > semi-colon ';' at end.
> >
> > Apparently not what one wants.
> >
> > Regards,  RobW
> > --
> > +------------------------------------------------------+
> > | Rob Wieringa                                         |
> > | Philips  Research  Laboratories   Eindhoven          |
> > | <remove _XXXXX_ from email address..>                |
> > | email: _XXX### [at] natlabresearchphilipscom   |
> > +------------------------------------------------------+

-


Post a reply to this message

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