ACLWin 3.0 Lisp Compatibility in ACL 5.0

$Revision: 5.0.2.4 $

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.

This document deals with compatibility of the implementation of Lisp in Allegro CL 5.0/5.0.1 compared by Allegro CL 3.0.x for Windows. This document does not deal with the foreign function interface (described in aclwffi.htm) nor graphics (Allegro CL 5.0/5.0.1 on Windows Common Graphics, like Allegro CL 3.0.x for Windows; click here for doc/cg/index.htm, which provides an introduction to Common Graphics documentation).

This document is for users porting from Allegro CL 3.0.x on Windows to Allegro CL 5.0/5.0.1 (on any platform). Users with no experience with Allegro CL 3.0.x on Windows can safely ignore this document as it contains no information useful to them.

Table of Contents

Introduction

Incompatibilities

The compatibility package


Introduction

This document describes the language incompatibilities between Allegro CL 5.0/5.0.1, sometimes in this document referred to as ACL, and Allegro CL 3.0.x for Windows, sometimes in this document referred to as ACLWin.

Only Lisp language differences are discussed in this document.

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/5.0.1 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/5.0.1 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/5.0.1.  ACLWin 3.0.x behaves as if the ACL 5.0/5.0.1 default was double-float.  Additionally, ACLWin only had one distinct floating point type (double), whereas ACL 5.0/5.0.1 has 2 (single and double).
  8. The following format directives conflict with the ANSI Common Lisp standard, and are not available in ACL:
  9. ~/date/
    ~/time/
    ~/lm/
    ~/rm/
    ~/dir/
    ~/move/
    ~/font/
    ~/fb/
    ~/fc/
    ~/fe/
    ~/fi/
    ~/fl/
    ~/fo/
    ~/fp/
    ~/fs/
    ~/fu/
    ~/base/
    ~/sub/
    ~/super/

  10. The #m dispatching reader macro is  not implemented in ACL.
  11. The ~Q format directive is not implemented in ACL.
  12. 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.

The progress-function optional arguments to fasl-write and fasl-read are not supported.  An error is signaled if they are given.