POV-Ray : Newsgroups : povray.newusers : Expected 'operator', ? found instead : Re: Expected 'operator', ? found instead Server Time
28 Jul 2024 14:31:53 EDT (-0400)
  Re: Expected 'operator', ? found instead  
From: Mike Williams
Date: 5 Oct 2008 03:37:46
Message: <se+0giAG7G6IFwPV@econym.demon.co.uk>
Wasn't it Mathuin who wrote:
>I'm trying to use the conditional expression in a function and get the 
>following
>error message:
>
>Parse Error: Expected 'operator', ? found instead
>
>Here's my function:
>
>#local ScoreStone = function(x) { (x=1) ? white_stone : black_stone }
>
>What am I doing wrong?  I thought ? was an operator -- that's what the 
>docs say.
> It happens on Windows with both 3.7 beta 28 and 3.6 as well as on Unix with
>3.6.  Thanks!


The syntax inside functions is different from that of the main SDL. It 
doesn't have "?" but it does have "select".

-- 
Mike Williams
Gentleman of Leisure


Post a reply to this message

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