Sorry I was confused about the issue above. I was reading {} in the block
sense, not the EBNF sense.


let { BINDING DELIMITER } *
in
  EXPR


where DELIMITER is ; or "\n"
effectively,  "in" would signify the end of the let block. and the variables
defined in the let block would be scoped only to the let block and EXPR

and EXPR has something to signify the beginning and end of its scope.
In code it would look like (modifying Zorg's example)

   let light_pos = [|-20.0; 20.0; 10.0; 1.0|];
        angle       = 42.0;
        light_diffuse = [|1.0; 1.0; 0.9; 1.0|];
        light_specular = [|1.0; 1.0; 0.9; 1.0|];
        light_ambient = [|0.15; 0.15; 0.15; 1.0|];
        light_normal = (normalize light_pos) * angle
   in
   {
       glLightfv gl_light0 gl_position light_pos;
       glLightfv gl_light0 gl_diffuse light_diffuse;
       glLightfv gl_light0 gl_specular light_specular;
       glLightfv gl_light0 gl_ambient light_ambient;
   }



On Thu, Mar 5, 2009 at 2:00 PM, Jonathan S. Shapiro <[email protected]>wrote:

> Dedents are not on the table at the moment. One issue at a time. In
> the absence of dedents, where does your second case end?
>
> On Thu, Mar 5, 2009 at 1:57 PM, Rick R <[email protected]> wrote:
> > In the 1st case, at the closing curly brace. In the 2nd, at the next
> Dedent.
> >
> >
> > On Thu, Mar 5, 2009 at 1:25 PM, Jonathan S. Shapiro <[email protected]>
> > wrote:
> >>
> >> Rick:
> >>
> >> You have the issue backwards. When does the let block END?
> >>
> >> On Thu, Mar 5, 2009 at 1:03 PM, Rick R <[email protected]>
> wrote:
> >> > I rather like
> >> >   let { binding and binding and binding in  EXPR}
> >> >
> >> > or let binding
> >> >         binding
> >> >         binding
> >> >         in EXPR
> _______________________________________________
> bitc-dev mailing list
> [email protected]
> http://www.coyotos.org/mailman/listinfo/bitc-dev
>



-- 
We can't solve problems by using the same kind of thinking we used when we
created them.
   - A. Einstein
_______________________________________________
bitc-dev mailing list
[email protected]
http://www.coyotos.org/mailman/listinfo/bitc-dev

Reply via email to