ACLWin 3.0 Compatibility in ACL 5.0

$Revision: 5.0.2.2 $

The document introduction.htm provides an overview of the Allegro CL documentation with links to all major documents. The document index.htm is an index with pointers to every documented object (operators, variables, etc.) The revision number of this document is below the title. These documents may be revised from time to time between releases.

Table of Contents

Introduction

Incompatibilities

The compatibility package

Foreign function compatibility


Introduction

This document describes the language incompatibilities between Allegro CL 5.0, hereafter referred to as ACL, and Allegro CL 3.0.x for Windows, hereafter referred to as ACLWin.

Only Lisp language differences are discussed in this document. For a discussion of Common Graphics or Runtime Delivery incompatibilities, please see Supplemental Common Graphics Documentation.

In particular, please note that the functionality described in this document is available in ACL by evaluating (require "aclwin"). The Runtime module called aclwin302.fasl is available only as part of building a Common Graphics deliverable application and is described in porting.hlp.


Incompatibilities

This section lists the incompatibilities between ACL and ACLWin.


Major Differences between Allegro CL 5.0 and Allegro CL for Windows 3.0.x

  1. In ACLWin there is no interpreter.  Everything typed to the toploop is compiled before evaluation.  In ACL, you need to explicitly compile Lisp source code.   Either put it in a file and use the Common Lisp function compile-file, or use the Common Lisp function compile.

Minor Differences between Allegro CL 5.0 and Allegro CL for Windows 3.0.x

  1. The handling of filenames beginning with a dot (.) is different in ACL and ACLWin.   For example, (merge-pathnames ".bil" "abc.cl") returns #P"abc.bil" in ACLWin and #p".bil.cl" in ACL.  That is, in ACL the namestring ".bil" is considered to be a file starting with a dot.  Use (make-pathname :type "bil") if you want to express the file type "bil" portably in both Lisps.
  2. In ACLWin, (nth -1 list) is equivalent to (nth 0 list).  In ACL, this form signals an error in unoptimized compiled code, but is undefined in optimized compiled code (when speed is greater than safety if compiler switches have their initial values).
  3. The Lisp object returned by reading #2a(#*00000000000000000000000000000000 #*11111111111111111111111111111111) is of type (simple-array bit (2 32)) in ACLWin and (array t (2 32)) in ACL.
  4. The reader syntax #2t((unsigned-byte 8) ((0 1) (2 3))) returns an object of type (simple-array (unsigned-byte 8) (2 2)) in ACLWin and in ACL the list ((unsigned-byte 8) ((0 1) (2 3))).
  5. There is no allegro.ini.  All of the parameters in this file are either set in other ways or are obsolete.  For example, the heap size argument is obsolete, since the heap in ACL grows as needed.
  6. Fixnums are much larger in ACL than in ACLWin.  In ACLWin fixnums use 16 bits.   In ACL they use 30 bits.
  7. *read-default-float-format* defaults to single-float in ACL 5.0.  ACLWin 3.0 behaves as if the ACL 5.0 default was double-float.  Additionally, ACLWin only had one distinct floating point type (double), whereas ACL 5.0 has 2 (single and double).
  8. The following format directives conflict with the ANSI Common Lisp standard, and are not available in ACL:
  9. The #m dispatching reader macro is  not implemented in ACL.
  10. The ~Q format directive is not implemented in ACL.
  11. file-length in ACLWin accepts strings (i.e., file names).  ACL follows the ANSI specification and requires a stream argument, and signals a type-error in all other cases.

Definitions not implemented in Allegro CL 5.0

Use of the items in this section will result in runtime errors and compile time warnings.  When available, similar functionality is noted in the error or warning, and this is summarized below.

The following symbols do not have definitions in ACL 5.0:

*application-directory* *case-sensitive-intern*
*comma-char* *comma-gap*
*command-line* *compiler-warnings*
*daylight-saving-time* *decimal-point-char*
*device-units-p* *fasl-save-doc-strings*
*fasl-save-lambda-lists* *format-date-style*
*gc-hook* *io-error*
*print-line-wraps* *print-namestring*
*print-shared* *read-case*
*read-dos-mode* *read-no-hang*
*read-source* *read-tolerant*
*save-doc-strings* *save-lambda-lists*
*session-exit-fns* *session-init-fns*
*session-variables* *top-print-length*
*top-print-level* *warn-on-protected-class-redefinition*
*warn-on-protected-function-redefinition* *warn-on-protected-generic-function-redefinition*
*warn-on-redefinition* backtrace
breakpoint breakpointf
canonize-type clear-page
clear-reader compound-stream-echo-p
compound-stream-input-streams compound-stream-output-streams
compound-stream-p copy
daylight-saving-time debugger
defdeclaration delete-declaration
delete-function delete-setf-method
delete-structure delete-type
delete-variable eof-p
file-create-date free-space
free-store fresh-page
generic-flet generic-labels
get-gc-config get-syntax
host-file-system in-package-presents
io-error make-compound-stream
mount new-page
prin profile
profile-reset profile-results
profilef profilef-reset
profilef-results quit
read-canonize read-canonize-function
read-lisp-line read-object
rubout save-image
set-char-name set-file-length
set-gc-config set-read-canonize-function
set-syntax setenv
simple-stream-p spaces
stream-device stream-location
tab total-space
tracef trap-exits
unbreakpoint unbreakpointf
unmount unprofile
unprofilef untracef
unwind-stack with-added-methods
write-object

Some of the items above are like existing ACL 5.0 facilities:

ACLWin item similar ACL 5.0 functionality
*application-directory* sys:command-line-arguments
*command-line* sys:command-line-arguments
*case-sensitive-intern* excl:set-case-mode
*read-case* excl:set-case-mode
*compiler-warnings* the CL condition system
*print-shared* common-lisp:*print-circle*
*session-exit-fns* sys:*exit-cleanup-forms*
*session-init-fns* *restart-init-function* and *restart-app-function*
*session-variables* *restart-init-function* and *restart-app-function*
*top-print-length* tpl:*print-length*
*top-print-level* tpl:*print-level*
*warn-on-protected-class-redefinition* redefinition warning facility (see 5.0 Package locking and package definition locking in packages.htm)
*warn-on-protected-function-redefinition* redefinition warning facility (see 5.0 Package locking and package definition locking in packages.htm)
*warn-on-protected-generic-function-redefinition* redefinition warning facility (see 5.0 Package locking and package definition locking in packages.htm)
*warn-on-redefinition* redefinition warning facility (see 5.0 Package locking and package definition locking in packages.htm)
*daylight-saving-time* *daylight-saving-time-observed*
eof-p read and listen
io-error the CL condition system
profile the ACL profiler (see profiling.htm)
profile-reset the ACL profiler (see profiling.htm)
profile-results the ACL profiler (see profiling.htm)
profilef the ACL profiler (see profiling.htm)
profilef-reset the ACL profiler (see profiling.htm)
profilef-results the ACL profiler (see profiling.htm)
save-image excl:dumplisp
unprofilef the ACL profiler (see profiling.htm)
unprofile the ACL profiler (see profiling.htm)
protect declaration redefinition warning facility (see 5.0 Package locking and package definition locking in packages.htm)

The compatibility package

Unless otherwise noted, all the functionality presented in the compatibility package works on UNIX as well as Windows.

The following symbols have definitions in ACL 5.0 equivalent to that in ACLWin 3.0:

*break-on-warnings* *print-structure* *time-zone* *trace-print-length*
*trace-print-level* +infinity +zero -infinity
-zero add-finalization adjoinq adjoinql
always-bound aset assocq assocql
bignump bit-zerop bits-from-integer buttail
char-names closed-stream-p concatenate-lists concatenate-strings
concatenate-vectors copy-array copy-file countq
countql create-directory current-directory define-setf-method
degrees-to-radians delete-directory delete-duplicates-q delete-duplicates-ql
deleteq deleteql delimited-string-to-list directory-exists-p
displaced-array-p eqcar errorset false
fasl-read fasl-write file-archive-p file-attributes
file-directory-p file-exists-p file-hidden-p file-normal-p
file-read-only-p file-system-p file-temporary-p findq
findql fixnump for gc
generic-fboundp generic-function-name get-setf-method get-setf-method-multiple-value
getenv i* i+ i-
i/ i/= i1+ i1-
i< i<= i= i>
i>= iabs iceiling idecf
ievenp ifloor iincf ilogand
ilogandc1 ilogandc2 ilogbitp ilogeqv
ilogior ilognand ilognor ilognot
ilogorc1 ilogorc2 ilogtest ilogxor
imax imin iminusp imod
integer-from-bits intersectionq intersectionql ioddp
iplusp irem iround isquare
itruncate izerop lambda-list lisp-copyright
list-to-delimited-string listify macroexpand-all make-quoted
mapply memberq memberql mfuncall
name-readtable nanp natural-log-base nbuttail
nintersectionq nintersectionql nset-difference-q nset-difference-ql
nset-exclusive-or-q nset-exclusive-or-ql nsublisq nsublisql
nsubstituteq nsubstituteql nsubstq nsubstql
nunionq nunionql positionq positionql
protect pushnewq pushnewql put
quotep radians-to-degrees rassocq rassocql
readtable-name remove-duplicates-q remove-duplicates-ql removeq
removeql room sbit-zerop select
set-bit set-char set-current-directory set-difference-q
set-difference-ql set-documentation set-exclusive-or-q set-exclusive-or-ql
set-fill-pointer set-lambda-list set-macro-function set-readtable-name
set-sbit set-schar set-symbol-function set-symbol-plist
shorten-vector signed-ldb simple-array-p special-form-p
special-variable-p square sublisq sublisql
subsetpq subsetpql substituteq substituteql
substq substql svset synonym-stream-p
synonym-stream-stream tree-equal-q tree-equal-ql true
type-specifier-p unionq unionql until
user-name while whole-string-equal whole-string-greaterp
whole-string-lessp whole-string-not-equal whole-string-not-greaterp whole-string-not-lessp
whole-string/= whole-string< whole-string<= whole-string=
whole-string> whole-string>= win32p windows-directory
xor

In addition, the following for loop keywords and options are available:

above all-satisfy append below
bound by car-filter check-for-loop-var-count
collect collect-reversed collect-vector collect-vector-reversed
count do downto filter
fixnum for-exit for-loop-macro for-loop-syntax-error
for-result for-var-spec from in
in-alist in-array in-hash-table in-package
in-package-externals in-package-internals in-package-presents in-plist
in-sequence in-stream in-string in-structure
in-vector keep-first keep-if keep-unless
max min nconc none-satisfy
not-all-satisfy on over-array over-vector
product result return-last set-for-loop-macro
some-satisfy step sum to
unless when

The following functions work only on Windows (they signal an error on UNIX):

file-read-only-p file-hidden-p file-system-p file-archive-p
file-normal-p file-attributes windows-directory

Misc notes on compatibility: