[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: while condition
From: |
Roberto Lopez |
Subject: |
Re: while condition |
Date: |
Tue, 06 Mar 2001 14:44:25 +0000 |
SZABO Sandor wrote:
>
> Hello,
>
> In doc I found the following ones:
>
> function f (...)
> while (nargin--)
> disp (va_arg ())
> endwhile
> endfunction
>
> ------
>
> Octave's while statement looks like this:
>
> while (condition)
> body
> endwhile
>
> Here body is a statement or list of statements that we call the body of
> the loop, and condition is an expression that controls how long the loop
>
> keeps running.
[snip]....
> -----------
> I would like to know what is the condition in
>
> while (nargin--)
>
> Sandor Szabo
Hi! This is mine! I know it, I know the answer.
nargin := number of input arguments in a function
nargin-- => nargin = nargin - 1
while( nargin--) => while ((nargin=nargin -1) > 0)
regards,
Rober
--
Roberto Lopez Lopez I love this game!
Optical Engineer, Technology Division Tel#: +34 922 605200
Instituto de Astrofisica de Canarias Fax#: +34 922 605210
38200 - La Laguna address@hidden
Tenerife, SPAIN http://www.iac.es
-------------------------------------------------------------
Octave is freely available under the terms of the GNU GPL.
Octave's home on the web: http://www.octave.org
How to fund new projects: http://www.octave.org/funding.html
Subscription information: http://www.octave.org/archive.html
-------------------------------------------------------------