POV-Ray : Newsgroups : povray.advanced-users : ?: : Re: ?: Server Time
28 Jul 2024 14:27:58 EDT (-0400)
  Re: ?:  
From: Warp
Date: 24 Feb 2005 18:04:28
Message: <421e5d7b@news.povray.org>
Andrew the Orchid <voi### [at] devnull> wrote:
> It appears that A?B:C doesn't work inside functions - but select() does. 
> Is this documented somewhere? (I presume this is the reason that both 
> constructs exist in the first place...?)

  Well, is the ?: operator listed as valid operator in user-defined
functions?

  While it might not be very clear from the documentation (it should
perhaps be), the SDL and the user-defined functions are basically two
completely different and independent languages. They somewhat resemble
each other, but the user-defined functions are basically a language
inside the SDL, not SDL itself. They are even interpreted at
completely different levels. For this reason not everything that
works in the SDL works in the user-defined functions.
  You can create the body of a user-defined function using SDL, but
that's just kind of user-defined function metaprogramming, that is,
a program (in a different language) which creates a program (in the
other language).

-- 
#macro M(A,N,D,L)plane{-z,-9pigment{mandel L*9translate N color_map{[0rgb x]
[1rgb 9]}scale<D,D*3D>*1e3}rotate y*A*8}#end M(-3<1.206434.28623>70,7)M(
-1<.7438.1795>1,20)M(1<.77595.13699>30,20)M(3<.75923.07145>80,99)// - Warp -


Post a reply to this message

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