Hello John,
On Mon, 27 Mar 2006 17:14:15 -0500 John Cowan <[EMAIL PROTECTED]> wrote:
> Is there a procedure that can be invoked to tell a program whether it is
> running in the interpreter or as compiled code?
I don't know if there is a specific procedure which does that, but a
plain quick&dirty&innacurate way could be:
(define interpreted
(let ((executable-filename (pathname-file (car (argv)))))
(lambda ()
(member executable-filename '("csi" "csi-static")))))
Awful and gives wrong answers if you generate a compiled program named
"csi" or "csi-static" (or if you rename the interpreter to something
different from "csi" and "csi-static"). Don't use it. :-)
Best wishes,
Mario
_______________________________________________
Chicken-users mailing list
[email protected]
http://lists.nongnu.org/mailman/listinfo/chicken-users