From: Charles Oliver Nutter Date: 2007-12-04T11:22:25+09:00 Subject: Re: Everyone's favorite flow control: retry MonkeeSage wrote: > As I understand, it's like a label in C. Charles' first example is > equivalent to something like this... > > #include > void foo(int (*pf)(const char *f, ...), char *a) { > (*pf)("%s\n", a); > } > int main() { > retry: > foo(&printf, "123"); > goto retry; > return 0; > } It's more than that...here's some pseudo C code: void foo() { goto retry; } int main() { retry: foo(); return 0; } Retry outside a rescue actually allows you to jump back across call boundaries and start an invocation again. Scary. - Charlie