|
 |
Am 02.12.2018 um 07:25 schrieb Phil:
> #declare thisfilename = magik_cube[X][Y][Z][F]
> paint_tile(thisfilename)
...
> File 'initialise_cube.mac' line 163: Parse Error: Cannot assign uninitialized
> identifier.
It is good practice to end each and every `#declare` with a semicolon,
even in cases where it is entirely optional.
The requirement for a semicolon at some variants of `#declare` is not
arbitrary: It is required everywhere there is a possibility that the
right-hand side expression might continue. If POV-Ray comes across a
macro invocation in such a case, POV-Ray presumes that the macro
invocation is still part of the right-hand side expression of the
`#declare`, so `paint_tile(thisfilename)` will take the old value of
`thisfilename`.
Totally unreleated: It is highly recommend to NOT use all-lowercase
identifiers, as these may conflict with keywords in future versions.
Post a reply to this message
|
 |