Re: ? 1={}, is there really any other interpretation?
- Posted by Al Getz <Xaxo at a?l?com> Jul 16, 2007
- 674 views
Gary Shingles wrote: > > Al Getz wrote: > > Because the 'if' statement requires a boolean, > > Name="Al" > > and > > Name="Pete" > > should be handled as boolean. > > The 'return' keyword also processes boolean statements too doesn't it? When > it is used in a function that is, ie "return a < 10" > > If double-equals for equality test could be implemented in a backward > compatible > way then I would be for it. eg: > > }}} <eucode> > integer a > a = 3 > > if a = 3 then > a = 5 > end if > </eucode> {{{ > > "Warning: single equal sign (=) for equality test detected at line 4" > (unless 'without warning' used) > > The only reason to do it though is to be friendly to people coding in other > languages. Not a really big issue IMHO; you know you can't assign in an > if/while/return > setting. > > If we do go down the 'other language friendly' road though, can we make it so > semi-colons at end of each line > are ignored? > > Gary Hi Gary, Yes that's true, but then it could also return a sequence, so i guess having the keyword define the return type wont work for 'return'. if This=That then would work for sequence or atom or a combination, but return This=That what type should it return? There would have to be something else done here, like maybe return {This=That} --return sequence return This=That --return integer (boolean) and perhaps this could be applied universally: if This=That then --no other interp so boolean x=(This=That) --x is integer x={This=That} --x is sequence Just some ideas. Take care, Al E boa sorte com sua programacao Euphoria! My bumper sticker: "I brake for LED's" From "Black Knight": "I can live with losing the good fight, but i can not live without fighting it". "Well on second thought, maybe not."