in reply to Eek! goto?
And of course, something like that can be ported to Perl:
#!/usr/bin/perl use strict; use warnings; my $n = shift; my $m = int (($n + 7) / 8); goto L . ($n & 7); L0: do { print "zero\n"; L1: print "one\n"; L2: print "two\n"; L3: print "three\n"; L4: print "four\n"; L5: print "five\n"; L6: print "six\n"; L7: print "seven\n"; } while -- $m > 0;
I'd love to be able to put something like that in a piece of production code.
Abigail
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Eek! goto?
by BrowserUk (Patriarch) on Feb 12, 2003 at 11:18 UTC | |
|
Re: Re: Eek! goto?
by hardburn (Abbot) on Feb 12, 2003 at 14:57 UTC |