Sophie

Sophie

distrib > Mandriva > 2010.0 > i586 > media > contrib-release > by-pkgid > cd14cddf3b3ceaf1193157472227757a > files > 899

parrot-doc-1.6.0-1mdv2010.0.i586.rpm

# Copyright (C) 2007-2009, Parrot Foundation.
# $Id: 50_goto.pir 38369 2009-04-26 12:57:09Z fperrad $

=head1

The unconditional jump is the simplest of all flow control devices in any
language, and PIR is no exception. Using the C<goto> command, control flow
can jump to any location with a label. Labels are named just like named
variables, except they have a colon C<:> at the end.

=cut

.sub main :main

    say "before branch"

    goto branch_to_here
      say "never printed"
  branch_to_here:

    say "after branch"

.end

# Local Variables:
#   mode: pir
#   fill-column: 100
# End:
# vim: expandtab shiftwidth=4 ft=pir: