Mathematica 9 is now available
Services & Resources / Wolfram Forums
-----
 /
MathGroup Archive
1996
*January
*February
*March
*April
*May
*June
*July
*August
*September
*October
*November
*December
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 1996

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

Search the Archive

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] ====


  • Prev by Date: Re: [Q] Plot in a Plot
  • Next by Date: Re: Re; Goto Limits
  • Previous by thread: Re: [Q] Plot in a Plot
  • Next by thread: Re: Re; Goto Limits