[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Compiling.




   I compiled some files (in fact, some modules) written in Le_Lisp.  The
result is quite satisfying, but I noticed some strange behaviour I mention
hereafter.

   Let us consider the following button specification:

	({butobj}:create 0
	                 0
	                 ({title}:create "Help")
	                 (lambda (button)
	                   (:display_help_menu ({link}:find button 'ctedit))))

   It is not equivalent to:

	({butobj}:create 0
	                 0
	                 ({title}:create "Help")
	                 #'(lambda (button)
	                     (:display_help_menu ({link}:find button
                                                              'ctedit))))

   which signals an error.

   Second problem.  If you define a menu as a variable:

	(defvar :tools_menu
	  (let ((button_1 ...)
	        ...
	        (button_n ...))
	    ({pulldown}:create 0 0 'column "My-tools" button_1 ... button_n)))

   an error message concerning the display is put down.  The right solution
seems to be:

	(de :tools_menu ()
	  (let ((button_1 ...)
	        ...
	        (button_n ...))
	    ({pulldown}:create 0 0 'column "My-tools" button_1 ... button_n)))

   These two problems are surprising since they concern features that work fine
in interpreted mode.  Moreover, the second problem forces us to rewrite all the
uses of each menu!


   If the Le_Lisp environment used for compiling is "centaur", that is:

	ROOTDIR=...
	USERDIR=...
	MODNAME=...
	CMPLC=centaur

	all: allcmplc

	allcmplc:
		$(ROOTDIR)bin/mkcmplc $(ROOTDIR) $(USERDIR) $(CMPLC) $(MODNAME)

   the following message is displayed:

	adduservent: Permission denied.

   It seems that there is no undesirable consequence, nevertheless, this
message is disconcerting.

   Concerning a Le_Lisp problem, I think you know the function "quomod", such
that "(quomod n1 n2)" returns the quotient of "n1" by "n2" and stores the
remainder of this division in the global variable "#:ex:mod".  We could believe
that this global variable is known by the compiler.  Nay!  We have to declare
explicitly:

	(defvar #:ex:mod)

   Finally, I succeeded in compiling all my modules, and I am happy of the
result.  But if you have some files that work fine in interpreted mode, and
want to compile them, you have not finished yet!  And the differences between
the texts that work in interpreted mode and the texts that can be compiled
without error are not slight, and all the differences are not signalled in the
documentation of the compiler.

   Yours faithfully,

				 J.-M. Hufflen