do
{
if (entry_is_valid)
{
BOOL discoveredEntry;
RemoveEntry(List);
discoveredEntry = !IsListEmpty(List)
process_valid_entry();
if (discoveredEntry)
goto DoNextListItem;
else
break;
}
else
{
BOOL discoveredEntry;
RemoveEntry(List);
discoveredEntry = !IsListEmpty(List)
process_notvalid_entry();
if (discoveredEntry)
goto DoNextListItem;
else
break;
}
ASSERT(FALSE); // Shouldn't get here.
DoNextListItem:
} while (!IsListEmpty(List)); do
{
BOOL discoveredEntry;
RemoveEntry(List);
discoveredEntry = !IsListEmpty(List)
if (entry_is_valid) {
process_valid_entry();
}
else {
process_notvalid_entry();
}
if (discoveredEntry)
goto DoNextListItem;
else
break;
}
ASSERT(FALSE); // Shouldn't get here.
DoNextListItem:
} while (!IsListEmpty(List)); do
{
BOOL discoveredEntry;
RemoveEntry(List);
discoveredEntry = !IsListEmpty(List)
if (entry_is_valid) {
process_valid_entry();
} else {
process_notvalid_entry();
}
}
} while ( discoveredEntry ); do
{
RemoveEntry(List);
if (entry_is_valid) {
process_valid_entry();
} else {
process_notvalid_entry();
}
}
} while ( !IsListEmpty(List) ); do {
RemoveEntry(List);
entry_is_valid ? process_valid_entry() : process_notvalid_entry() ;
} while ( !IsListEmpty(List) );
void process_entry( bool valid ) {
valid ? process_valid_entry() : process_notvalid_entry() ;
} do {
RemoveEntry(List);
process_entry( entry_is_valid ) ;
} while ( !IsListEmpty(List) );You think it'd be easier to tell if something was less than zero, wouldn't you? :) Thanks for the great post nkyad!
bool IsNegative(double n)
{
string nStr = n.ToString();
if (nstr.IndexOf('-', 0, 1)) return true;
return false;
}
« Older "I don't think I saw one white person besides the ... | This is good... Newer »
This thread has been archived and is closed to new comments
posted by Ryvar at 1:43 AM on April 27, 2005