Re: sh?tpile of errors
santosh <santosh.k83@gm ail.comwrites:
Don't be such a moron all your life Santosh. It compiling is the first
step to get Bill to fix his own bugs. So no, compiling it is NOT beside
the point.
santosh <santosh.k83@gm ail.comwrites:
Richard wrote:
>
>>
>I needed a good laugh so I complied the rubbish above. It took 10
>seconds to get it to compile with only warnings.
>
<snip>
>
Why republish horribly broken code when you aren't going to attempt to
correct it?
>
That it compiles is beside the point.
>
>"Bill Cunningham" <nospam@nspam.c omwrites:
>>Here's a reposting of the source.
>>>
>>#include <stdio.h>
>>#include <stdlib.h>
>>#include <ctype.h>
>>#define ex exit(EXIT_FAILU RE)
>>>
>>int main (int argc, char *argv[]) {
>> if (argc!=4) {
>> puts("print usage error");
>> ex;
>> }
>> if (isalpha(argv[1]) || isalpha(argv[2]) {
>> puts("print non alpha allowed");
>> ex;
>> }
>> FILE *fp;
>> double x,y;
>> x=strtod(argv[1],NULL);
>> y=strtod(argv[2],NULL);
>> if (fp=fopen(argv[3],"a"))==EOF) {
>> puts("fopen error");
>> }
>> fprintf(fp,"%.2 f",x,y);
>> if (fclose(fp))==E OF) {
>> puts("fclose error");
>> }
>>return 0;
>>}
>>>
>>#include <stdio.h>
>>#include <stdlib.h>
>>#include <ctype.h>
>>#define ex exit(EXIT_FAILU RE)
>>>
>>int main (int argc, char *argv[]) {
>> if (argc!=4) {
>> puts("print usage error");
>> ex;
>> }
>> if (isalpha(argv[1]) || isalpha(argv[2]) {
>> puts("print non alpha allowed");
>> ex;
>> }
>> FILE *fp;
>> double x,y;
>> x=strtod(argv[1],NULL);
>> y=strtod(argv[2],NULL);
>> if (fp=fopen(argv[3],"a"))==EOF) {
>> puts("fopen error");
>> }
>> fprintf(fp,"%.2 f",x,y);
>> if (fclose(fp))==E OF) {
>> puts("fclose error");
>> }
>>return 0;
>>}
>I needed a good laugh so I complied the rubbish above. It took 10
>seconds to get it to compile with only warnings.
<snip>
>
Why republish horribly broken code when you aren't going to attempt to
correct it?
>
That it compiles is beside the point.
>
step to get Bill to fix his own bugs. So no, compiling it is NOT beside
the point.
Comment