|
|
| Author |
Message |
| Gazdaman |
This post is not being displayed .
|
 Gazdaman I did a trackday!!!

Joined: 12 Aug 2004 Karma :    
|
|
| Back to top |
|
You must be logged in to rate posts |
|
 |
| Walloper |
This post is not being displayed .
|
 Walloper Super Spammer

Joined: 24 Feb 2005 Karma :   
|
|
| Back to top |
|
You must be logged in to rate posts |
|
 |
| The View Askew |
This post is not being displayed .
|
 The View Askew World Chat Champion

Joined: 30 Nov 2005 Karma :    
|
 Posted: 03:56 - 14 Mar 2006 Post subject: |
 |
|
all=0
It is the ONLY thing that could make sense. piss take  ____________________ "Do what you always did, get what you always got" |
|
| Back to top |
|
You must be logged in to rate posts |
|
 |
| Hex |
This post is not being displayed .
|
 Hex Party Boy

Joined: 04 Feb 2002 Karma :   
|
 Posted: 09:59 - 14 Mar 2006 Post subject: |
 |
|
Well if you show that x = whatever by the loop ending then it should just be a case of changing the condition on the loop, no?
For example:
x = 0
while (x != y) {
x = x + 1;
}
display x
Of course with y not been declared then you have the problem that it could be a negative number.
Is that the kind of thing your after?
As for showing x = x+y and x=x-y, then surely y can only be 0 as how could x = itself plus or minus anything else? ____________________ The BCF's very own Party boy! Though he's getting old and feeling it!
Monkey hanger, Born and bred
My little photo portfolio |
|
| Back to top |
|
You must be logged in to rate posts |
|
 |
| Gazdaman |
This post is not being displayed .
|
 Gazdaman I did a trackday!!!

Joined: 12 Aug 2004 Karma :    
|
 Posted: 12:17 - 14 Mar 2006 Post subject: |
 |
|
That's exactly what I thought Hex. But I wasn't sure, and in the documentation I'm pretty sure it states that while (x != 0) { } is the only while statement allowed.
Otherwise I agree, that way makes sense.
We have a /very/ chinese teacher, and hopefully she's neglected to mention we can in fact use x != y.
And thanks to everyone else that replied
Gaz |
|
| Back to top |
|
You must be logged in to rate posts |
|
 |
| Gazdaman |
This post is not being displayed .
|
 Gazdaman I did a trackday!!!

Joined: 12 Aug 2004 Karma :    
|
|
| Back to top |
|
You must be logged in to rate posts |
|
 |
Old Thread Alert!
The last post was made 20 years, 105 days ago. Instead of replying here, would creating a new thread be more useful? |
 |
|
|