Re: How to tell the difference bewteen comparing and assigning

new topic     » goto parent     » topic index » view thread      » older message » newer message

On  0, irv at take.maxleft.com wrote:
> 
> jbrown105 at speedymail.org wrote:
> > On  0, stabmaster_ at HOTMAIL.COM wrote:
> > > 
> > > One way to spot comparisons (although it probably doesn't cover _all_ 
> > > possible comparisons) are when '=' is used after 'if' or 'while'
> > > 
> > > if 1=0 then...
> > > 
> > > while 0=1 do...
> > > 
> > > etc.
> 
> Why don't you download Dave Cuny's Py interpreter 
> and see how he did it? 
> IIRC it uses = as both an assignment operator and 
> a comparison operator. For atoms AND sequences.
> 
> Regards,
> Irv
> 

That would work perfectly ... if I was using Py's parser (Ox) instead
of
the parser use by Dot. At this time I would rather not implement such
a heavy rewrite (although I probably will one day anyways) so this is
not
really an option (at least not a simple one). (When I do finally give
in
and attempt a rewrite of Dot, I will most definitly consider looking at
Py and Ox to use as the parser for the new program however.)

jbrown



-- 
http://fastmail.fm - 100% lightning

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu