MathGroup Archive 2005

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: goto and label

  • To: mathgroup at smc.vnet.net
  • Subject: [mg57760] Re: [mg57734] goto and label
  • From: "Owen, HL \(Hywel\)" <h.l.owen at dl.ac.uk>
  • Date: Tue, 7 Jun 2005 05:59:49 -0400 (EDT)
  • Sender: owner-wri-mathgroup at wolfram.com

Think of the tag in Label as a line number - for instance, Label[L100].
You can then use Goto[L100] to move control to that point. The help
shows (in v5.1) shows all the commands on one line - you can put in line
breaks after each semicolon command break (;) to help make the code more
readable.

BUT - before you go ahead, a recommendation: Don't use Goto!! It's a
horrible command that you should never need to use. It's only included
in Mathematica for completeness.

There are far more efficient ways of doing whatever task it is that you
want, that will run faster, and that you will be able to understand when
you come back in 3 months (or whatever) and try to debug or modify you
code.

Perhaps if you post what the problem is someone in the group could
suggest a 'standard' way of doing it.

Hywel

-------------------------------------------
Hywel Owen h.owen at dl.ac.uk
Accelerator Science and Technology Centre
CCLRC Daresbury Laboratory
United Kingdom
Tel/Fax: +44 1925 603797/603192
-------------------------------------------
 

> -----Original Message-----
> From: Guy Israeli [mailto:guyi1 at netvision.net.il] 
To: mathgroup at smc.vnet.net
> Sent: 07 June 2005 07:04
> Subject: [mg57760] [mg57734] goto and label
> 
> Hi
> 
> can someone give clearer instruction on how to use Goto and 
> label than the help offers?
> 
> Thanks,
> 
> Guy 
> 
> 
> 
> 


  • Prev by Date: Re: goto and label
  • Next by Date: Re: Manipulating textfiles (subtitlefiles for films)
  • Previous by thread: Re: goto and label
  • Next by thread: Re: goto and label