Re: [q-lang-users] Special values or failing functions
Brought to you by:
agraef
From: Albert G. <Dr....@t-...> - 2007-05-18 13:30:37
|
Ok, I just committed the necessary changes to implemented _FAIL_, but I still need a nice and useful example of _FAIL_ for the documentation. Any ideas? About the name: I sticked to '_FAIL_' after all. I know that it sticks out like a sore thumb, but that's actually intended. :-) Alexander Nickolsky wrote: > I mean 'fail' acts as if the current rule's left side did not match. > _FAIL_ is a regular function. Note that 'fail' is a "regular function", too. In fact, if you take a look at the latest cvs sources you'll see that both fail and _FAIL_ are implemented in a completely analogous fashion. They both just signal a special kind of exception which is then handled in the guts of the interpreter by aborting either just the current equation or all remaining equations, respectively. Albert -- Dr. Albert Gr"af Dept. of Music-Informatics, University of Mainz, Germany Email: Dr....@t-..., ag...@mu... WWW: http://www.musikinformatik.uni-mainz.de/ag |