Miscellaneous > Programming & Networking

A Small Question

<< < (2/2)

Aegwyn:
Nyahh!!!

Unfortunately, both voidmain *and* bazoukas' code still have the same darn problem... That is...
Try putting anything *BUT* S, M, or L in the input doohickey. You will very quickly find that you'll just get promptly kicked out of the loop, with no way back in.

Is there a better way to do this than my half attempt? Perhaps put the 'back into the loop' thingy afterwards? But, on second thought, that might get a little ugly...

Can anyone help me? Or is it just my wacko MPW compiler, and it works fine everywhere else?

Service With A Smile: ),
Aegwyn

[Edit: Ah! I can't even remember what I've called myself... Stupid internet. :D  ]

[ September 08, 2002: Message edited by: Aegwyn ]

Bazoukas:
Woops! Thats a screwup!
You have three choices the the Shopping interface
S: Buy a small chicken(50 Gold)
M: Buy a medium chicken(100 Gold)
L: Buy a large chicken(200 Gold)
Which do you want? S, M or L?
Right now you have 0 S, 0 M and 0 L.
y
Woops! Thats a screwup!
You have three choices the the Shopping interface
S: Buy a small chicken(50 Gold)
M: Buy a medium chicken(100 Gold)
L: Buy a large chicken(200 Gold)
Which do you want? S, M or L?
Right now you have 0 S, 0 M and 0 L.
5
Woops! Thats a screwup!
You have three choices the the Shopping interface
S: Buy a small chicken(50 Gold)
M: Buy a medium chicken(100 Gold)
L: Buy a large chicken(200 Gold)
Which do you want? S, M or L?
Right now you have 0 S, 0 M and 0 L.
,
Woops! Thats a screwup!
You have three choices the the Shopping interface
S: Buy a small chicken(50 Gold)
M: Buy a medium chicken(100 Gold)
L: Buy a large chicken(200 Gold)
Which do you want? S, M or L?
Right now you have 0 S, 0 M and 0 L.
1
Woops! Thats a screwup!
You have three choices the the Shopping interface
S: Buy a small chicken(50 Gold)
M: Buy a medium chicken(100 Gold)
L: Buy a large chicken(200 Gold)
Which do you want? S, M or L?
Right now you have 0 S, 0 M and 0 L.
!
Woops! Thats a screwup!
You have three choices the the Shopping interface
S: Buy a small chicken(50 Gold)
M: Buy a medium chicken(100 Gold)
L: Buy a large chicken(200 Gold)
Which do you want? S, M or L?
Right now you have 0 S, 0 M and 0 L.
k
Woops! Thats a screwup!
You have three choices the the Shopping interface
S: Buy a small chicken(50 Gold)
M: Buy a medium chicken(100 Gold)
L: Buy a large chicken(200 Gold)
Which do you want? S, M or L?
Right now you have 0 S, 0 M and 0 L.
l
Woops! Thats a screwup!
You have three choices the the Shopping interface
S: Buy a small chicken(50 Gold)
M: Buy a medium chicken(100 Gold)
L: Buy a large chicken(200 Gold)
Which do you want? S, M or L?
Right now you have 0 S, 0 M and 0 L.
;
Woops! Thats a screwup!
You have three choices the the Shopping interface
S: Buy a small chicken(50 Gold)
M: Buy a medium chicken(100 Gold)
L: Buy a large chicken(200 Gold)
Which do you want? S, M or L?
Right now you have 0 S, 0 M and 0 L.

 I tried these characters and it didnt kick me out of the loop.
   Unless you are asking about something else and I didnt get it.

Aegwyn:
Meh...
Must be MPW. Oh well, looks like I'm going to have to tackle this problem from another completely different angle. If I can be bothered to.  ;)

Service With A Smile ,
Aegwyn

Bazoukas:
kinda feels good though that you are better than your compiler huh   :D

voidmain:
Aegwyn, you were *definitely* missing a "break" where I said, and after I added the break it worked properly. I suspect that you were still running an old binary copy of your program. Verify the source code has the "break", compile it and then look at the times on the binary that you are going to run and compare with the source code time that you compiled from and don't forget to put the "./" in front of the binary name (./shop). The time on the binary should be newer than than the source you copied from my example.

Navigation

[0] Message Index

[*] Previous page

Go to full version