Mailing List Archive

Support open source code!


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: java question



"Stephen J. Turnbull" <turnbull@example.com>  writes:

>(defun integer-mung ()
>   (let ((i (read)))
>      (if (and (> i 10) (< i 0)) ; check range
>          (integer-mung)
>        (throw 'value i))))
>
>(catch 'value (integer-mung))
>

Invalid input is not handled here, in java NumberFormatException
is defined so that you can and must handle it (a good thing
after all)

Just tried this in emacs (having replaced and with or). Is this
a common way of doing things in lisp? I mean throwing exceptions
just to jump somewhere?

(just curious)Viktor

Home | Main Index | Thread Index

Home Page Mailing List Linux and Japan TLUG Members Links