- Joined
- Apr 22, 2005
- Sythe Gold
- 23
- Messages
- 7,825
This makes it easier for people familiar with Delphi and SCAR to use C++ by adding the familiar repeat/until loop. Only difference is that it must be capitalized to fit naming conventions.
Add this to the beginning of your file(s) after the includes/other directives:
Example usage:
Add this to the beginning of your file(s) after the includes/other directives:
Code:
#define REPEAT do{
#define UNTIL( condition ) }while(!(condition));
Code:
#include <iostream>
#define REPEAT do{
#define UNTIL( condition ) }while(!(condition));
using namespace std;
int main(int argc, char *argv[])
{
int i = 0;
REPEAT
cout << "The value of i is: " << i << endl;
i++;
UNTIL(i==10)
system("PAUSE");
return EXIT_SUCCESS;
}













