Re: Re; Goto Limits
- To: mathgroup at smc.vnet.net
 - Subject: [mg3101] Re: [mg3090] Re; Goto Limits
 - From: Jesus ROJO <jesroj at wmatem.eis.uva.es>
 - Date: Thu, 1 Feb 1996 03:21:53 -0500
 - Mailer: Elm [revision: 70.85]
 - Sender: owner-wri-mathgroup at wri.com
 
Your message:
> 
> 	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                |
|  47011 VALLADOLID, Spain            |
|  Phone : 34 - 83 - 42 33 90         |
|  Fax   : 34 - 83 - 42 34 06         |
|  e-mail: jesroj at wmatem.eis.uva.es   |
---------------------------------------
==== [MESSAGE SEPARATOR] ====