[Scilab-users] Nested while loops

Chris Gardner cgardner88 at sympatico.ca
Tue Aug 8 19:19:21 CEST 2017


To solve a problem I am working on, I would like to nest several while loops (up to maybe 10 serially) within another while loop.  The structure I need is something like:

for i = 1:N

	while (condition 1)
		action 1

		while  (condition 2)
			action 2
		end

		while (condition 3)
			action 3
		end

		while (condition 4
			action 4
		end

		action 5

	end

end

I have tried to implement this but have had trouble getting it to work.  Should it work?

Thanks, Chris


More information about the users mailing list