|
From: | Carlo de Falco |
Subject: | Re: Problem creating compiled oct file |
Date: | Mon, 5 Oct 2009 10:14:42 +0200 |
On 4 Oct 2009, at 17:22, babelproofreader wrote:
int ii; // Declare the loop counter ii as integer typefor (ii = octave_idx_type (0); ii<c.length (); ii++) // Start theloop
It is better, for code portability, to use "octave_idx_type" rather than "int" as the type for vector indices so you could change the above to
for (octave_idx_type ii (0); ii<c.length (); ii++)
note that this also changes the scope of the variable ii so that it is only visible inside the "for" loop, I usually find this convenient as I tend to use the same name for all counters...
c.
[Prev in Thread] | Current Thread | [Next in Thread] |