This program demonstrates conditions and restarts. It's uses the Common-Dylan library. Harlequin users should substitute the Harlequin-Dylan library and d2c users should upgrade to the latest CVS version. Mindy users should volunteer to help me implement Common-Dylan for Mindy. I've appended my info-dylan message describing this program. Cheers, Eric --- info-dylan message On Tue, Apr 13, 1999 at 06:01:25PM +0000, Michael T. Richter wrote: > I'm afraid that I'm more interested in the practical side of things than > the theoretical. I understand the model, I think, (especially now that > you've done the excellent summary) but cannot for the life of me > translate this into code. This is why I was asking if there was source > code someone could point to so I could see how the individual pieces fit > together in terms of actual typing. OK, I need to write some test code for this feature, anyway. I've appended a program which produces the following output: $ restart-example goodfile1 goodfile2 goodfile3 Processing file 'goodfile1'. Processing file 'goodfile2'. Processing file 'goodfile3'. $ restart-example badfile1 Cannot find the file 'badfile1'. Alternate file (RETURN for none): goodfile1 Processing file 'goodfile1'. $ restart-example badfile1 Cannot find the file 'badfile1'. Alternate file (RETURN for none): badfile2 Cannot find the file 'badfile2'. Alternate file (RETURN for none): goodfile1 Processing file 'goodfile1'. $ restart-example badfile1 Cannot find the file 'badfile1'. Alternate file (RETURN for none): Processing aborted because the file 'badfile1' could not be found. This program shows how to design and document a restart protocol, implement condition handlers, perform non-local exits, and do all sorts of fun Dylan tricks. The processing code is completely separate from the user-interface code, too, thanks to the use of s. This program also shows off a tiny fraction of what Dylan can do. If most of your experience involves C++ or Java, you may have to bend your mind a bit. Please don't hesitate to ask questions if something seems confusing. > >Dylan's actually about four times as powerful as it appears. :-) > > That's about right from my tinkering. There are an awful lot of Deep Magic > concepts in this deceptively small language. Yup. Dylan's a Trojan horse, of sorts. You can begin by using it as a straightfoward, object-oriented language with some neat libraries. But if you use it some more, you'll discover that Dylan has a tiny core which is very powerful. > And I haven't even really done any digging at macros yet (beyond using the > standard ones, natch).... Ah, that's a problem for another day. :-) For now, poke around at the attached program. Cheers, Eric