goto-do-label
- To: mathgroup at christensen.cybernetics.net (mathgroup)
- Subject: [mg421] goto-do-label
- From: Jesus ROJO <jesroj at wmatem.eis.uva.es>
- Date: Tue, 24 Jan 95 14:20:04 PWT
Hello, I find, when using Mathematica, the followng programming problem: The instruction 'Goto' cannot be used to jump out of a loop 'Do'. For example, the following programme here shown in a summarized form: variable[arguments_]:=Module[{ ... }, ..................................... Do[ ..................................... Goto[end]; ..................................... ,{i,1,5}]; ..................................... Label[end]; ..................................... ] (* end of Module *) alwais gives me the following error message: CompoundExpression::::goto: Label[end] requested by Goto not found. I naturally find ways to get round it, but I would like it to function as expected (for example, as in FORTRAN). Is this correct ? Is there any way to correct it ? 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 | ---------------------------------------