POV-Ray : Newsgroups : povray.documentation.inbuilt : Mysterious function argument : Re: Mysterious function argument Server Time
2 Dec 2021 14:02:59 EST (-0500)
  Re: Mysterious function argument  
From: William F Pokorny
Date: 3 Oct 2021 08:23:06
Message: <6159a0aa$1@news.povray.org>
On 10/2/21 10:38 PM, Kenneth wrote:
> "Kenneth" <kdw### [at] gmailcom> wrote:
>>
>> #declare F0 = function {pattern {bozo}}
>>   ..throws a fatal error just by itself, "Expected 'Rvalue to declare', pattern
>>   found instead"
>>
> [and...]
>> I just ran that 'pattern' version in v3.7.0 (Windows), and it
>> fails there too, same error message...
> 
> MY ERROR! I mixed up my various tests :-\  Those two #declared functions DO
> parse OK in Windows, in both v3.7.0 and v3.8.0 beta 1. Very sorry for the
> confusion.
> 
> What I actually *tested* was this comparison, by mistake (but still interesting,
> and maybe odd- but certainly off-topic here):
> 
> #declare PATT =
> pattern{bozo}
> ... which fails parsing
> 
> or..
> 
> #declare PATT =
> pigment{bozo}
> ...which parses successfully
> 

Ah, good. Thanks for following up.

---
Aside: In my tcl wrapper for SDL, I have functions which allow me to 
declare Patterns, Warps, Radiosity, and other blocks(1) by name so they 
can just be references later by name as needed(1). The capability to 
pre-declare certain blocks by ID unfortunately isn't / wasn't 
implemented for some features of POV-Ray's SDL.

(1) - Underneath it creates macros which then are, repeatedly, inserted 
as needed.

The missing declare ability I trip over frequently, when writing raw 
SDL, is: #declare Warp00 = warp{...}.

Bill P.


Post a reply to this message

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