[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Chicken-users] Compiler or interpreter?
From: |
Mario Domenech Goulart |
Subject: |
Re: [Chicken-users] Compiler or interpreter? |
Date: |
27 Mar 2006 22:24:04 -0300 |
User-agent: |
Gnus/5.09 (Gnus v5.9.0) Emacs/21.4 |
Hello John,
On Mon, 27 Mar 2006 17:14:15 -0500 John Cowan <address@hidden> 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