POV-Ray : Newsgroups : povray.international : [ES] Error en el Parser Server Time
11 May 2021 12:51:36 EDT (-0400)
  [ES] Error en el Parser (Message 1 to 7 of 7)  
From: Martin
Subject: [ES] Error en el Parser
Date: 24 Aug 2007 06:18:22
Message: <46ceb06e$1@news.povray.org>




camera{ location <20,10,10> look_at 0}
light_source{100 rgb<1,1,1>}

//version 3.6.1c.icl8.win32
//-----------------------------------------------------------------------------------
#local topD= -233; #local topH= 33;

condicional

#if(topD < 180 & topH > 180) | (topD < -180 & topH > -180))
   #local y_mn= 4;
#else #local y_mn= 0; #end

sphere{0,y_mn pigment{rgb<1,1,0> }}

Gracias y un saludo.


Post a reply to this message

From: Warp
Subject: Re: [ES] Error en el Parser
Date: 24 Aug 2007 06:29:30
Message: <46ceb30a@news.povray.org>
Seems to be some quirk in the parser. In general:

#if(false) | anything you put here will be ignored

will parse without giving any error. Odd, but probably innocuous.

-- 
                                                          - Warp


Post a reply to this message

From: Warp
Subject: Re: [ES] Error en el Parser
Date: 24 Aug 2007 06:41:40
Message: <46ceb5e4@news.povray.org>
Warp <war### [at] tagpovrayorg> wrote:
> #if(false) | anything you put here will be ignored

  Actually the | is not even necessary.

  The think is that if the condition evaluates to false then everything
will be skipped until the #else (or #end if there's no #else).

-- 
                                                          - Warp


Post a reply to this message

From: Martin
Subject: Re: [ES] Error en el Parser
Date: 24 Aug 2007 08:18:21
Message: <46cecc8d$1@news.povray.org>
> Warp <war### [at] tagpovrayorg> wrote:
>> #if(false) | anything you put here will be ignored
> 
>   Actually the | is not even necessary.
> 
>   The think is that if the condition evaluates to false then everything
> will be skipped until the #else (or #end if there's no #else).
> 
Thank you.

But this is an uncached syntax error. Isn't it supposed that one 
parser's job is to cach syntax errors?

-----------------------------------------

detectar errores de sintaxis?


Post a reply to this message

From: Manuel Mata
Subject: Re: [ES] Error en el Parser
Date: 26 Aug 2007 06:25:01
Message: <web.46d154e5474ddf256c941f7e0@news.povray.org>
> #local topD= -233; #local topH= 33;
> #if(topD < 180 & topH > 180) | (topD < -180 & topH > -180))
>    #local y_mn= 4;
> #else #local y_mn= 0; #end
>
> sphere{0,y_mn pigment{rgb<1,1,0> }}




Es eso ?

Un saludo


Post a reply to this message

From: Martin
Subject: Re: [ES] Error en el Parser
Date: 27 Aug 2007 05:48:31
Message: <46d29def$1@news.povray.org>
>> #local topD= -233; #local topH= 33;
>> #if(topD < 180 & topH > 180) | (topD < -180 & topH > -180))
>>    #local y_mn= 4;
>> #else #local y_mn= 0; #end
>>
>> sphere{0,y_mn pigment{rgb<1,1,0> }}
> 


> 
> Es eso ?
> 
> Un saludo
> 
> 

No, no. Es lo que aclara Warp. Por lo visto es un error conocido del que 






Un saludo.


Post a reply to this message

From: Warp
Subject: Re: [ES] Error en el Parser
Date: 27 Aug 2007 09:53:34
Message: <46d2d75e@news.povray.org>
Martin <don### [at] onocom> wrote:
> No, no. Es lo que aclara Warp. Por lo visto es un error conocido del que 



  It's not an error per se. It's just how the parser has been made to
work. The parser simply evaluates the condition, and if it evaluates
to false, it just skips everything until it finds a corresponding #else
or #end. It doesn't perform syntax checking while skipping.
  This might not be the most user-friendly way of doing it, but that's
different from being a programming error.

-- 
                                                          - Warp


Post a reply to this message

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