At 11:22 AM 10/23/2009, Sidney Reilley II wrote:
>I also read that "&fail" will trigger backtracking as in:
>
>writes(! name) + &fail

Some might say that &fail is a crutch for the uncreative! :)

Any failing expression can be used to produce the same behavior:

% ie
Icon Evaluator, Version 1.1, ? for help
][ write(!"abc") + (1 = 0)
a
b
c
Failure

][ write(!"abc") + !""
a
b
c
Failure

This suggests a "Most Creative Failure" competition! :)

It's interesting to note that any binary operator can be used instead 
of "+" -- if the second expression doesn't produce a result, the 
operator is never invoked.

Incidentally, something not mentioned in this discussion is the 
notion of an expression's "result sequence" -- the sequence of 
results an expression will product when driven to failure.  For 
example, the expression 7 has the result sequence {7}.  !"abc" has 
the result sequence {"a", "b", "c"}

1 to 4 < 3 has an empty result sequence but for (1 to 4) < 3 it's {3,3}

After 30 years I'm still in love with Icon! 


------------------------------------------------------------------------------
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
_______________________________________________
Unicon-group mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/unicon-group

Reply via email to