POV-Ray : Newsgroups : povray.general : this semicolon .... Server Time
1 Nov 2024 23:14:45 EDT (-0400)
  this semicolon .... (Message 1 to 5 of 5)  
From: Uwe Zimmermann
Subject: this semicolon ....
Date: 7 Jul 1999 10:00:35
Message: <37835D82.F336C42B@ele.kth.se>
Hej there!

It's about this funny little sign ";" which has become obligate after
some 
#declare and #local directives. It's not really a bug, just a little bit
of inconvenience - or may be I'll just have to get used to it (after the
quantum leap from v3.0 to v3.1e).

It's just that I "automatically" set a semicolon after all those
declarations (as in other languages like Pascal, JavaScript etc.), of
course ending up with an error message, if the declaration concerned an
object, texture etc. - or simply said everything that's not a float,
vector or color....

I have no idea of the parsing behind the POV scenes but wouldn't it be
nice to at least ignore a semicolon after all definition statements - it
would make it a little bit more logical (at least to me).



But perhaps not the program should be changed but the user....

     Uwe.


Post a reply to this message

From: Nieminen Mika
Subject: Re: this semicolon ....
Date: 7 Jul 1999 11:54:20
Message: <3783782c@news.povray.org>
Uwe Zimmermann <uwe### [at] elekthse> wrote:
: It's just that I "automatically" set a semicolon after all those
: declarations (as in other languages like Pascal, JavaScript etc.), of
: course ending up with an error message, if the declaration concerned an
: object, texture etc. - or simply said everything that's not a float,
: vector or color....

  I often type somehting like: MyMacro(1,2);
  This, of course, gives an error...

-- 
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

From: Gerald K  Dobiasovsky
Subject: Re: this semicolon ....
Date: 7 Jul 1999 21:40:45
Message: <3784019d@news.povray.org>
Uwe Zimmermann <uwe### [at] elekthse> wrote:
> Hej there!
>
> It's about this funny little sign ";" which has become obligate after
> some
> #declare and #local directives. It's not really a bug, just a little bit
> of inconvenience - or may be I'll just have to get used to it (after the
> quantum leap from v3.0 to v3.1e).
>
> It's just that I "automatically" set a semicolon after all those
> declarations (as in other languages like Pascal, JavaScript etc.), of
> course ending up with an error message, if the declaration concerned an
> object, texture etc. - or simply said everything that's not a float,
> vector or color....
>
> I have no idea of the parsing behind the POV scenes but wouldn't it be
> nice to at least ignore a semicolon after all definition statements - it
> would make it a little bit more logical (at least to me).
>
>
>
> But perhaps not the program should be changed but the user....
>
>      Uwe.


...and I thought I was the only person with that problem :)

The function 'Parse_Semi_Colon()' in the source is designed to give
a warning if it encounters a different token, but of course could be
changed to silently go on where a semicolon isn't required.

The tedious work would be to search for all the places in the parser
where one had put the additional calls to this function.

     Gerald


Post a reply to this message

From: Chris Huff
Subject: Re: this semicolon ....
Date: 8 Jul 1999 11:28:59
Message: <3784C4CD.3C876128@compuserve.com>
In my opinion, the semicolon should be either required for all #declares
and #locals, or it should be removed. The inconsistancy is annoying.(I
keep trying to put a semicolon after a texture or object declaration.)


Post a reply to this message

From: Nathan Kopp
Subject: Re: this semicolon ....
Date: 10 Jul 1999 01:32:46
Message: <3786D9E7.946470EB@Kopp.com>
Chris Huff wrote:
> 
> In my opinion, the semicolon should be either required for all #declares
> and #locals, or it should be removed. The inconsistancy is annoying.(I
> keep trying to put a semicolon after a texture or object declaration.)

I agree.  Plus, it would remove ambiguity in the case of layered textures,
which currently can cause problems:

 object {
    My_Object
  #declare Layered_Examp =
    texture {T1}
    texture {T2}
    texture {T3}
  }

Are textures T2 & T3 part of Layered_Examp or are they two textures in
the object?  Probably in the docs somewhere, but I can't find it now.
(yes, that code was modified from examples in the POV documentation)

-Nathan


Post a reply to this message

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