POV-Ray : Newsgroups : povray.general : Roots of a function Server Time
19 Apr 2024 20:56:38 EDT (-0400)
  Roots of a function (Message 11 to 15 of 15)  
<<< Previous 10 Messages Goto Initial 10 Messages
From: William F Pokorny
Subject: Re: Roots of a function
Date: 1 Oct 2019 08:04:04
Message: <5d9340b4@news.povray.org>
On 9/30/19 7:04 PM, Alain Martel wrote:
> Le 2019-09-29 à 08:48, William F Pokorny a écrit :
...
>> A declare without the leading # works too but we get:
>>
>> File 'tmp.pov' line 40: Parse Warning: Should have '#' before 'declare'.
>> File 'tmp.pov' line 40: Possible Parse Error: 'declare' should be 
>> changed to
>>   '#declare'. Future versions may not support 'declare' and may require
>>   '#declare'.
> 
> Using declare instead of #declare can result in an error at parse time.
> 

If you have an example which results in an actual error at parse time, 
I'd like to get it.

I have a collection of parser test cases and I spent time yesterday 
capturing/creating parser test cases for these '#' variants. I didn't 
come up with anything that generated an actual parse error - or render 
problem - only the warnings above.

I did come up with a case with isolated #s ahead of a bare 'declare' 
which did NOT generate the warnings above (I found a parser bug) though 
the render result was still fine.

>>
>> Given this warning, I'd think we should be getting one on #object {} 
>> and the like too as the other side of the syntax change push - now 
>> that I understand there is another side.
> 
> #object should generate a warning.
> Same for #Primitive_Name
> 

Unsure if you were agreeing we should be getting such warnings, or 
saying POV-Ray does generate such a warning. If the latter, I never saw 
that while trying different things. If warnings for #Primitive_Name do 
sometimes happen, I'd like an example test case for my collection.

Also had the thought last night, Does say '#accuracy 0.001' work..? It
does.

Aside: I've converted to vim/gvim for my editor. Still working to get 
back up to speed, but, vim itself ships with syntax highlighting and 
indenting for POV-Ray v3.7(1) and, interestingly, it specifically 
supports the '#<zero or as many spaces as you want>local' type syntax 
for the language control elements (and #default{} and not default{} if 
wondering - matching our current documentation).

Bill P.

(1) - There are some issues with it as others have noted. I might have 
go at my own v3.8 version adding error indications for bad # use along 
with v3.8 plus experimental feature support.


Post a reply to this message

From: jr
Subject: Re: Roots of a function
Date: 1 Oct 2019 13:50:01
Message: <web.5d9390cbb127c26ffeeb22ff0@news.povray.org>
hi,

William F Pokorny <ano### [at] anonymousorg> wrote:
> ...
> Aside: I've converted to vim/gvim for my editor. ...

in case you don't already know: ":he tcl"  ;-)


regards, jr.


Post a reply to this message

From: IGM
Subject: Re: Roots of a function
Date: 2 Oct 2019 05:40:00
Message: <web.5d946f7db127c26f2d4647f30@news.povray.org>
Alain Martel <kua### [at] videotronca> wrote:
>
> Why that «#» in front of «object» and that other one in front of
> «cylinder» ?
>
> The «#» is needed in front of directives, never in front of a primitive.

My bad habit... I use # in front of primitives since I started playing with
povray, for uniformity. Now I know it's strongly discouraged.


Post a reply to this message

From: William F Pokorny
Subject: Re: Roots of a function
Date: 3 Oct 2019 08:44:19
Message: <5d95ed23$1@news.povray.org>
On 10/1/19 1:45 PM, jr wrote:
> hi,
> 
> William F Pokorny <ano### [at] anonymousorg> wrote:
>> ...
>> Aside: I've converted to vim/gvim for my editor. ...
> 
> in case you don't already know: ":he tcl"  ;-)
> 
> regards, jr.
> 
Yes! Not yet done anything with the capability, but certainly one of the 
reasons I went to vim/gvim over other options. Relatively strong 
coupling/behavioral similarities to the bash shell another.

Aside: I bought the book you recommended and found it useful. Thanks. In 
fact I should probably read through it again.

More than two months and the old muscle habits are still tripping me up 
all the time! The deeper I am in thought about something else, the less 
conscious I am about the editor, the more I trip. It really bugs me 
because it rips apart my concentration. The screen changes and I have no 
idea what I did! "Oh, yeah..." I found too my touch typing skills had 
drifted over the years due - whatever - I guess. Trying to reign in 
those bad habits too.

Bill P.


Post a reply to this message

From: jr
Subject: Re: Roots of a function
Date: 4 Oct 2019 17:50:06
Message: <web.5d97bdb6b127c26ffeeb22ff0@news.povray.org>
hi,

William F Pokorny <ano### [at] anonymousorg> wrote:
> On 10/1/19 1:45 PM, jr wrote:
> > William F Pokorny <ano### [at] anonymousorg> wrote:
> >> ...
> >> Aside: I've converted to vim/gvim for my editor. ...
> > in case you don't already know: ":he tcl"  ;-)
> >
> Yes!

:-)

> Not yet done anything with the capability, but certainly one of the
> reasons I went to vim/gvim over other options. Relatively strong
> coupling/behavioral similarities to the bash shell another.
>
> Aside: I bought the book you recommended and found it useful. Thanks. In
> fact I should probably read through it again.

I go through .. phases where the book is next to the keyboard for days on end.

> More than two months and the old muscle habits are still tripping me up
> all the time! The deeper I am in thought about something else, the less
> conscious I am about the editor, the more I trip. It really bugs me
> because it rips apart my concentration. The screen changes and I have no
> idea what I did! "Oh, yeah..." I found too my touch typing skills had
> drifted over the years due - whatever - I guess. Trying to reign in
> those bad habits too.

the book's subtitle applies, it would seem.  :-)


regards, jr.


Post a reply to this message

<<< Previous 10 Messages Goto Initial 10 Messages

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