Zelaron Gaming Forum  
Stats Arcade Portal Forum FAQ Community Calendar Today's Posts Search
Go Back   Zelaron Gaming Forum > The Zelaron Nexus > Science and Art > Tech Help

View Poll Results: Have you heard of state machines before
What machines? 7 70.00%
Yeah, I've heard of them 1 10.00%
Not only have I heard of them, but I've used them a few times 1 10.00%
Have I heard of them? I use them on a regular basis 1 10.00%
Voters: 10. You may not vote on this poll

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next

 
Reply
Posted 2002-06-15, 09:34 AM in reply to WetWired's post "State Machines"
Okay, I know what you're talking about now...

switch (melmac)
{
case 0: {run code here; melmac = 1; break;}
case 1: {run code here; do calculations; if (bob == 5) melmac = 2; else melmac = 3; break;}
case 2: {cout << "Bob equaled five!"; break;}
case 3: {cout << "Stupid Bob, it didn't equal five!"; break;}
}

Will only run one case statement each time through (might be a bit off, haven't programmed in C++ in a few months...)
Old
Profile PM WWW Search
BlueCube enjoys the static noises of ten television sets simultaneously tuned to 412.84 MHzBlueCube enjoys the static noises of ten television sets simultaneously tuned to 412.84 MHz
 
 
BlueCube
 



 

Bookmarks

« Previous Thread | Next Thread »

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 

Posting Rules [Forum 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


All times are GMT -6. The time now is 07:02 PM.
'Synthesis 2' vBulletin 3.x styles and 'x79' derivative
by WetWired the Unbound and Chruser
Copyright ©2002-2008 zelaron.com
Powered by vBulletin® Version 3.8.2
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
This site is best seen with your eyes open.