Michele La Monaca scripsit: > I think eval usage (and limitations) can be avoided: For example: > > (define-syntax eping > (syntax-rules () > ((_ h) > (handle-exceptions exn > (_eping (symbol->string '|h|)) > (let ((t h)) (_eping t))))))
That traps all exceptions, not just undefined-variable ones. In addition, you need to quote the use of h in the last line, as it is not a variable. In addition, change |h| to h as noted earlier. > as regarding (symbol->string '|h|), what you are saying is that in > this context it is equivalent to (symbol->string 'h) and that one > happens to work only because Chicken considers '192.168.0.1 a valid > symbol while in standard Scheme is not. Right? Right. > Anyway, it seems to me > quite a limitation that IP addresses are not valid Scheme symbols and > something that should be fixed if it is an artificially imposed > limitation. The idea is that the lexical scanner should be able to recognize quickly if something is a number or a symbol, so no symbol is allowed to have a prefix that is a valid number, with a few historical exceptions. Chicken takes the approach of scanning a whole symbol, attempting to convert it to a number, and if that fails assuming it's a symbol. -- LEAR: Dost thou call me fool, boy? John Cowan FOOL: All thy other titles http://www.ccil.org/~cowan thou hast given away: co...@ccil.org That thou wast born with. _______________________________________________ Chicken-users mailing list Chicken-users@nongnu.org https://lists.nongnu.org/mailman/listinfo/chicken-users