home *** CD-ROM | disk | FTP | other *** search
/ Power-Programmierung / CD1.mdf / magazine / drdobbs / 1991 / 09 / bigquest.lst < prev    next >
File List  |  1991-08-21  |  1KB  |  56 lines

  1. _LITTL┼ LANGUAGES¼ BI╟ QUESTIONS_
  2. b∙ Ra∙ Valdes
  3.  
  4. Example 1: 
  5.  
  6. (a)
  7.  
  8.     char s[] = {
  9.          '\t'
  10.          '0',
  11.          '\n',
  12.          '}',
  13.          ';',
  14.          '\n',
  15.          '\n',
  16.  
  17.          '/',
  18.          '*',
  19.          '\n',
  20.          ...213 lines deleted...
  21.          0
  22.     };
  23.     /* 
  24.      * The string s is a representation of the body
  25.      * of this program from '0' to the end.
  26.      */
  27.     
  28.     main()
  29.     {
  30.         int i;
  31.     
  32.         printf("char\ts[]={\n");
  33.         for (i=0 ; s[i]; i++)
  34.             printf("\t%d,\n",s[i]);
  35.         printf("%s",s);
  36.     }
  37.  
  38.  
  39. (b)
  40.  
  41.     ( (lambda (x) (list x (list (quote quote) x)))
  42.       (quote
  43.        (lambda (x) (list x (list (quote quote) x))) ))
  44.  
  45.  
  46. (c)
  47.  
  48.          S N=$C(13)_$C(10)_$C(9) S Q=$C(34) S S="W N_""S N=$C(13)_$C(10)_$C(9)
  49. S Q=$C(34) S S=""_Q W Q_S_N F I=1:1 S C=$E(S,I) Q:$L(C)=0  W $S(I=5:Q_C,I=45:Q
  50. _C,C=$C(59):N,1:C);Q;" 
  51.          W N_"S N=$C(13)_$C(10)_$C(9) S Q=$C(34) S S="_Q W Q_S_N F I=1:1 S C=
  52. $E(S,I) Q:$L(C)=0  W $S(I=5:Q_C,I=45:Q_C,C=$C(59):N,1:C) 
  53.          Q
  54.  
  55. è
  56.