//------------------------------------------------------- // Example of how to use params in PbO // // Written by Quinn Hsu // A simple program that writes to STDOUT a T made of // stars given a height and a width //------------------------------------------------------- #include #include ##PARAM (int height); ##PARAM (int width); int main(int args, char** argv) { if (##width%2 != 1) { printf("width must be an odd number\n"); exit(-1); } if (##height < 2) { printf("height must be greater than 1\n"); exit(-1); } int count; for(count=0; count<##width; count++) { printf("*"); } printf("\n"); int inner_count; for(count=1; count<##height; count++) { for(inner_count=0; inner_count<(##width/2); inner_count++) { printf(" "); } printf("*\n"); } }