help-octave
[Top][All Lists]
Advanced

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

Re: While loop error, is not recognized


From: Doug Stewart
Subject: Re: While loop error, is not recognized
Date: Sat, 28 Apr 2018 11:13:17 -0400



On Sat, Apr 28, 2018 at 10:32 AM, renzosebs <address@hidden> wrote:
Thanks for your help. Yes, that was a mistake I made but the problem is not
that, is that while is not being closed. I dont have the scope that is
seeing in Sahil photo. The code is here:
function [i] = whale(a)
  b=a;
  i=0;
  while (i<10)
    i
    i=i+1;
  endwhile
  for z=1:i
    fprintf("%d", z);
  endfor
endfunction

But the problem is that the function end with the while, the endwhile is
closing the function and not the while loop. I hope this picture makes more
clear my problem. 

<http://octave.1599824.n4.nabble.com/file/t372838/Screenshot_20180428_092935.png>

Sorry for also posting in Stack, I am new in this thing od posting in
forums.



This works ok for me!

Did you make a file called   while.m

use :
which while 

this should say nothing but if it shows a file then that is your problem.





--
DASCertificate for 206392


reply via email to

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