Skip to content

Instantly share code, notes, and snippets.

@jromeem
Created August 4, 2012 06:29
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jromeem/3255124 to your computer and use it in GitHub Desktop.
Save jromeem/3255124 to your computer and use it in GitHub Desktop.
output to compiler-- intermediate code for a Pascal program
(program graph1 (progn output)
(progn (:= i 0)
(label 1)
(if (<= i 32)
(progn (:= x (* 6.250000e-02
(float i)))
(:= y (* (funcall exp (- x))
(funcall sin (* 6.283180e+00
x))))
(:= n (+ (funcall round (* 3.200000e+01
y))
34))
(progn (label 0)
(funcall write ' ')
(:= n (- n 1))
(if (= n 0)
(progn)
(goto 0)))
(funcall writeln '*')
(:= i (+ i 1))
(goto 1)))))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment