Alice Community  

Go Back   Alice Community > Alice 2 > How do I...?

Thread Tools Display Modes
Help me prove my teacher wrong
Posts: n/a
Default Help me prove my teacher wrong - 02-17-2011, 10:34 AM

Ok my teacher says that a while with a false condition will not do anything.
I fear he is right but i am stuborn and want the satisfaction of proving him wrong. Please help me.
Reply With Quote
Super Moderator
x2495iiii's Avatar
Status: Offline
Posts: 3,508
Join Date: Dec 2008
Location: Somewhere in the Continental U.S.
Default 02-17-2011, 11:24 AM

A while with a false condition really won't do anything. It's there as a placeholder to keep while methods disabled for a while if you haven't got the relevant variable up yet.

The only way you could maybe say otherwise is if you had a variable that was set to false, and a while condition of "while variable is false." Technically that isn't a false condition, but it does resolve to false.
Reply With Quote
Senior Member
Dameria's Avatar
Status: Offline
Posts: 978
Join Date: Sep 2009
Location: United States
Default 02-17-2011, 04:40 PM

A while statement is basically looping a true statement over and over until it turns false. If the while statement is false to begin with, it will just not run in the first place, and Alice will skip ahead to the next piece of code.

So no, False will not do anything, sorry.

Check out my best projects so far and please comment:

Tic-Tac-Toe 2.0 ...................
Alice Paint ...........................
Real-Time Clock ..................
Maze Game .........................
Reply With Quote

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Copyright ©2020, Carnegie Mellon University
Alice 2.x 1999-2012, Alice 3.x 2008-2012, Carnegie Mellon University. All rights reserved.