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

>
> 10.1.4.2 Identifier Declaration
>
> try: #local A=array[1]{function{x+y+z}}
> works fine for me with beta 12

I added USER_FUNCTION to the RVALUE list.  I removed USER_FUNCTION from the
ACTUAL_PARAM item for a macro (section 10.1.4.8)
since it would now be redundant.


> > > 10.1.4.3  File Input/Output
> > >
> Try this twice - first time as is, second time with uncommented line with
> array redeclaration:
>
>  [snip]
> At first run script reads into declared (becouse symbol A[1] is known and has
> memory reference) and assigned (with value 2) entry. At second run (with
> uncommented line) script reads into declared but not assigned entry. Now try
> this the same way:
>
>  [snip]
> In second run (with uncommented line) it returns parse error becouse A[0] is
> not declared. It is not declared becouse it wasn't specified with first
> assigment which could define type of entries in array.

I added ARRAY_REFERENCE to the DATA_IDENTIFIER list.  I also added an item note: "May
read a value into an array reference if
the array element's type has already been established."


> > > 10.1.4.3  File Input/Output
> > >
> > >   I suggest to add to File Input/Output quick ref section about EOF detecting.
> >
> > "It does not provide definitions for the numerous keywords nor explain their
usage!"
>
> Since there are parts of possible file operations: open, read, write, close I
> just found EOF detecting as another possible IO-operation. It could be
> explanation of usage if it would be used in #ifdef section. But using it in
> File Input/Output section is more like using #declare assigment explanation in
> User Defined Functions section.

I added an item note:  "Use defined(FILE_HANDLE_IDENTIFIER) to detect end-of-file
after a read."


> > > 10.1.4.8  Macro
> >
> > I am avoiding TOKENS because that includes punctuation.  Can we have a macro that
returns just a plus sign or a
parenthesis?
>
> Of course:
>  [snip]

I replaced MACRO_ITEM with TOKENS and removed the MACRO_ITEM definition.


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


Post a reply to this message

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