The Daily Static
  The Daily Static
UF Archives
Register
UF Membership
Ad Free Site
Postcards
Community

Geekfinder
UFie Gear
Advertise on UF

Forum Rules
& FAQ


Username

Password


Create a New Account

 
 

Back to UserFriendly Strip Comments Index

code styles by dennismv2004-12-30 06:44:05
  what about this? by korazail 2004-12-30 13:58:57
I'm gonna jump in here really really late... because I read the board backwards. Anyway.
You mentioned your condition was based on the result of processing x();
so I would wrap x like such:
bool func_x(){
 x();
 return condition();
}

and then call my loop like so:
while (func_x();)
{
 y();
}

That should make sure x() runs both first AND last.
The only problem might come if you have to pass variables to x... I'd have to actually break out a compiler and play around to see if there would be any issues with that.
-- Any reason this wouldn't work?
[ Reply ]
    this will work by dennismv2006-11-19 12:55:59

 

[Todays Cartoon Discussion] [News Index]

Come get yer ARS (Account Registration System) Source Code here!
All images, characters, content and text are copyrighted and trademarks of J.D. Frazer except where other ownership applies. Don't do bad things, we have lawyers.
UserFriendly.Org and its operators are not liable for comments or content posted by its visitors, and will cheerfully assist the lawful authorities in hunting down script-kiddies, spammers and other net scum. And if you're really bad, we'll call your mom. (We're not kidding, we've done it before.)