home *** CD-ROM | disk | FTP | other *** search
Text File | 1989-04-13 | 866 b | 31 lines | [TEXT/MPS ] |
- Best small program: <cs.vu.nl!maart> Maarten Litmaath
-
- Maarten Litmaath
- Free University (VU) Amsterdam
- Department of computer science
- Uilenstede 72
- 1183 AK Amstelveen
- The Netherlands
-
- Try: litmaath eschew obfuscation
-
- Note the unusual structure:
-
- while (<condition>)
- ;
-
- Did you notice that the body is empty?
-
- The best one can do to understand how the program works is to give it
- two small strings as arguments, and follow the program closely. One
- could make the body of the 'while' loop an 'fprintf' with interesting
- variables like:
-
- fprintf(stderr,
- "argv=%lo *argv=%lo **argv=%c argv[1]=%lo *argv[1]=%c argc=%d\n",
- (long) argv, (long) *argv, *argv && **argv ? **argv : '@',
- (long) argv[1], argv[1] && *argv[1] ? *argv[1] : '@', argc);
-
- Furthermore, it's interesting to note that only two variables are
- used to achieve everything.
-