help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Go to line in program


From: Helios de Rosario
Subject: Re: Go to line in program
Date: Mon, 03 Mar 2014 11:55:19 +0100

>>> El día 03/03/2014 a las 0:20, "Cloud.Strife"
<address@hidden>
escribió:
> Ho I can say to octave that he has to to go to a specific line in
program?
> For example in condition "if". If it is true rewrite variable and go
back to
> line 24
> 

There is no "goto" in Octave, but this could do what you want:

# Put the code that must be repeated in a do-until block
do
  # [Here goes your code]
  # assign your condition to repeat to the variable
"condition_to_repeat"
  if (condition_to_repeat)
    # [rewrite your variable here]
  end
until !condition_to_repeat
# Then continue...

But be sure that condition_to_repeat will become false some day, so
that you don't get stuck in an endless loop!

Helios

INSTITUTO DE BIOMECÁNICA DE VALENCIA
Universidad Politécnica de Valencia • Edificio 9C
Camino de Vera s/n • 46022 VALENCIA (ESPAÑA)
Tel. +34 96 387 91 60 • Fax +34 96 387 91 69
www.ibv.org

  Antes de imprimir este e-mail piense bien si es necesario hacerlo.
En cumplimiento de la Ley Orgánica 15/1999 reguladora de la Protección
de Datos de Carácter Personal, le informamos de que el presente mensaje
contiene información confidencial, siendo para uso exclusivo del
destinatario arriba indicado. En caso de no ser usted el destinatario
del mismo le informamos que su recepción no le autoriza a su divulgación
o reproducción por cualquier medio, debiendo destruirlo de inmediato,
rogándole lo notifique al remitente.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]