Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #define COMMAND(__COMMAND__, __FORMAT__, ...)
- void __COMMAND__ ( __VA_ARGS__ ) {
- printf( __FORMAT__, ##__VA_ARGS__ );
- }
- COMMAND( Start, "m start %cr", (char) unit )
- COMMAND( Home, "m homer" )
- COMMAND( Add_To_Chart, "cv 0 %d %dr", (int) ch1, (int) ch2 )
- // literally hundreds of additional COMMANDs needed here.
- COMMAND( A, "cv 0 %d %dr", (int)ch1, (int)ch2 )
- // error: expected declaration specifiers or ‘...’ before ‘(’ token
- // void A ( (int)ch1, (int)ch2 ) {
- // printf( "cv 0 %d %dr", (int)ch1, (int)ch2 );
- // }
- COMMAND( B, "cv 0 %d %dr", int(ch1), int(ch2) )
- // error: expected expression before ‘int’
- // void B ( int(ch1), int(ch2) ) {
- // printf( "cv 0 %d %dr", int(ch1), int(ch2) );
- // }
Add Comment
Please, Sign In to add comment