Re: Re[2]: Multitask Feedback
- Posted by jacques deschĂȘnes <desja at globetrotter.net> Sep 25, 2005
- 442 views
D. Newhall wrote: > > akusaya wrote: > > > (snip) > > > > Again, and again, how about a feature to ignore return values after > > calling a function? It's really annoying, almost every time I make a > > little Eu program I need to do something like > > > > PP = seek(fn, 100) > > > > where PP is a global variable I defined in aku.e which is an include > > file I always include when starting to write a new Eu program. (almost > > never write a Eu program without an "include"!) > > > > All languages I know allow ignoring function return values. Why not > > Eu? > > > > (BTW, I tried making a website with PHP, unexpectedly it's not a lot > > harder than using Eu, but much easier since it has rich functions and > > database access functions) > > > > Well, functions return values for a reason and it's not that hard to ignore a > return > value. Is it annoying? At times, yes. Worth adding some language construct to > the langauge > to remedy it? Definitely not. > > Here, this is what I use: > > }}} <eucode> > procedure ignore(object x) > -- Do nothing, just ignore the object passed > end procedure -- ignore > > ignore( seek(fn, 100) ) > </eucode> {{{ > > It's not that hard to implement and use, looks neat and clear, and most > importantly > doesn't change Euphoria in any way. > > > The Euphoria Standard Library project : > <a href="http://esl.sourceforge.net/">http://esl.sourceforge.net/</a> > The Euphoria Standard Library mailing list : > <a > href="https://lists.sourceforge.net/lists/listinfo/esl-discussion">https://lists.sourceforge.net/lists/listinfo/esl-discussion</a> > Why not just global object ignore ignore = seek(fn,100) that way you save procedure call overhead. regards, Jacques DeschĂȘnes