POV-Ray : Newsgroups : povray.beta-test : [doc] language directives quick ref : Re: [doc] language directives quick ref Server Time
29 Jul 2024 20:23:48 EDT (-0400)
  Re: [doc] language directives quick ref  
From: Robert Chaffe
Date: 13 Mar 2002 22:19:22
Message: <3c9016ba@news.povray.org>

>
> 10.1.4.2  Identifier Declaration
>
>   I can't find function() case in possible RVALUE

The RVALUE item is part of the ARRAY_INITIALIZER and ARRAY_ELEMENT_ASSIGNMENT items. 
In testing possible assignments of
RVALUEs to array elements, I could not get a user-defined function item to work.  So I
left it out of the RVALUE list.  Was
this a bug that has been corrected?  If so, I'll simply add USER_FUNCTION to the list
and also correct the Macro's ACTUAL_PARAM
item.  Let me know.

The assignment to a user-defined function is also covered in section 10.1.3.4 with the
USER_FUNCTION_DECLARATION item.

> 10.1.4.3  File Input/Output
>
>   Considering discussion about array entries and final "something can be
>   declared but not assigned" I suggest to change:
>   DATA_IDENTIFIER:
>     UNDECLARED_IDENTIFIER | (...)
>   to
>   DATA_IDENTIFIER:
>     UNDECLARED_IDENTIFIER | UNASSIGNED_IDENTIFIER | (...)

I am not sure what you mean here.  Outside of arrays, I don't think there is such a
thing as an unassigned identifier.  And
even for the arrays, it would be an unassigned element, would it not?  I cannot use
#read to read a value directly into an
array element.  Please correct me with an example!

> 10.1.4.3  File Input/Output
>
>   I suggest to add to File Input/Output quick ref section about EOF detecting.

This appears to be something that might go against my statement, "It does not provide
definitions for the numerous keywords nor
explain their usage!"  Perhaps a better item would be a "Jump to SDL" link that sends
us to section 6.2.3 ?

> 10.1.4.8  Macro
>
>   Describes MACRO_DEFINITION as
>     #macro MACRO_IDENTIFIER ( ... ) SCENE #end
>   where SCENE is:
>     LANGUAGE_DIRECTIVE|CAMERA|LIGHT|OBJECT|ATMOSPHERIC_EFFECT|GLOBAL_SETTINGS
>   So how it can return texture or function with macro ? I think good
>   replacement could be:
>     #macro MACRO_IDENTIFIER ( ... ) SCENE | RVALUE #end
>   or as in conventional syntax frame:
>     #macro MACRO_IDENTIFIER ( ... ) TOKENS #end

I am avoiding TOKENS because that includes punctuation.  Can we have a macro that
returns just a plus sign or a parenthesis?

I have replaced SCENE with MACRO_ITEM... and added the following definition:
MACRO_ITEM:
    SCENE  |  RVALUE

Now that I look at this though, is it possible to have more than one RVALUE?  If not,
we'll have to come up with something
else.

> Additional feature request (but probably not a simple task): could it be
> possible to replace all identifiers with links to aproprioate quick ref part ?

Well, of course, I cannot speak for the distributed documentation.  For the web page I
decided to not link anything that could
be found in the table of contents at the top of the page.  While creating this
reference, I agonized for a time over the
possibility of including an ITEM_DECLARATION with each "ITEM" that could be declared
(OBJECT_IDENTIFER, COLOR_MAP_IDENTIFIER,
etc.).  The original documentation does this.  Instead I assumed that the reader could
find Identifier Declaration in the
contents for any identifier and figure it out.

Robert Chaffe
http://www.donovansweb.com/~chaffe/


Post a reply to this message

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