POV-Ray : Newsgroups : povray.programming : Identifier declared but never used : Re: Identifier declared but never used Server Time
28 Jul 2024 22:17:51 EDT (-0400)
  Re: Identifier declared but never used  
From: Steve
Date: 18 Apr 1999 08:25:12
Message: <3719C203.D483A153@puzzlecraft.com>
I guess you're on a UNIX version. On the Mac, the includes are added through a
menu so there is no typing. New includes are added to the menu. This cures the
typo prob for the includes.

Also, on the Mac, we can link an external text editor to the regular POV Mac
Unofficial editor. BBEdit supports keyword color coding and custom dictionaries
and can check hundreds of separate text files at once. I have special
preferrences saved in BBEdit to check large POVscripts and collections of
includes for typos. BBEDit then uses the POV raytracer accessed through an
AppleEvent command set. POV has an extremely limited aete resource to allow
external control but the Unofficial team is adding the support. When this is
achieved, I'll probably just use the high ocatane BBEdit all the time with
POV-Ray functioning like a plug-in.

It would be very nice if POV supported color keyword custom dictionaries
directly. Maybe my C++ education will progress to the point that I can do it
someday.

The coincident surface warning is a good one. It doesn't seem very difficult to
test for the condition. Testing for unused includes doesn't appear too
difficult, either.

steve


Nieminen Mika wrote:

>   Some times (or better: many many times) I use an include file or a macro
> (mainly those made by Colefax :) ) and I set parameters for it by #declaring
> identifiers but I make a typing mistake (like typing Deform_Mesh or
> defor_mesh or whatever instead of deform_mesh) and then I wonder why it
> doesn't work. Then I have to search through all the 30 #declares to
> see if one of them is incorrect.
>   Wouldn't it be nice to have a warning option in povray just like in
> most C (or whatever language) compilers? This option would turn on
> warnings of the type "Identifier declared but never used" and I would
> immediatly see if I mistyped an identifier.
>   Of course there's one big problem with this: If you include, for
> example, colors.inc, you will get a few warnings...
>   There should be a way to exclude parts of the code from being tested
> for this kind of warnings. Something like this:
>
> #no_warnings
> #include "colors.inc"
> #include "textures.inc"
> #end
>
> #include "coolmacro.inc"
> ...
>
>   The warning code could also test other things. It would be nice to see
> warning messages like:
>
> Warning: CSG object has coincident surfaces.
> Warning: The output image file is used in image_map
> etc...
>
> --
> main(i,_){for(_?--i,main(i+2,"FhhQHFIJD|FQTITFN]zRFHhhTBFHhhTBFysdB"[i]
> ):5;i&&_>1;printf("%s",_-70?_&1?"[]":" ":(_=0,"\n")),_/=2);} /*- Warp -*/


Post a reply to this message

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