Re: Re; Goto Limits

• Subject: [mg3101] Re: [mg3090] Re; Goto Limits
• From: jesroj at wmatem.eis.uva.es (Jesus ROJO)
• Date: 1 Feb 1996 05:29:17 -0600
• Approved: usenet@wri.com
• Distribution: local
• Newsgroups: wri.mathgroup
• Organization: Wolfram Research, Inc.
• Sender: daemon at wri.com

>
> 	Hi, am trying to operate a Goto[label] inside a If[] conditional
> does anyone know what the limits of this command are? I cannot seem to
> get the Goto[] to work as a conditional of If[]. Is there a better way
> of estabishing a loop that has a exit condition and a loop condition?
> Thanks for the help.
> Andre
>

Hello,

A example of the way of run the obstacle
with Goto-If-Label is the next

(* begin of example *)
(* start of loop *)

noposiblepivote=0;
For[
k=2,
k=!=n&&noposiblepivote==0,
k++,
....................
pivote=0.; npivote=k;
Do[
If[pivote<Abs[Pivote[[i]]],pivote=Abs[Pivote[[i]]];npivote=i,]
,{i,k,n}];
If[pivote<10^(-20),noposiblepivote=1];
....................
];

(* after the loop *)

If[noposiblepivote==1,Goto[noposibleconpivote]];
If[noposiblepivote==2,Goto[noposiblesinpivote]];
....................
Label[noposibleconpivote];
....................

(* end of example *)

I hope this help,
Jesus ROJO

--
---------------------------------------
|  Jesus ROJO                         |
|  Dpto. de Matematica Aplicada       |
|  E.T.S. de Ingenieros Industriales  |
|  Paseo del Cauce s/n                |