Movatterモバイル変換


[0]ホーム

URL:


[LISPWORKS][Common Lisp HyperSpec (TM)][Previous][Up][Next]


FunctionMAKE-PACKAGE

Syntax:

make-packagepackage-name&key nicknames use =>package

Arguments and Values:

package-name---astring designator.

nicknames---alist ofstring designators. The default is theempty list.

use---alist ofpackage designators. The default isimplementation-defined.

package---apackage.

Description:

Creates a newpackage with the namepackage-name.

Nicknames are additionalnames which may be used to refer to the newpackage.

use specifies zero or morepackages theexternal symbols of which are to be inherited by the newpackage. See thefunctionuse-package.

Examples:

 (make-package 'temporary :nicknames '("TEMP" "temp")) =>  #<PACKAGE "TEMPORARY"> (make-package "OWNER" :use '("temp")) =>  #<PACKAGE "OWNER"> (package-used-by-list 'temp) =>  (#<PACKAGE "OWNER">) (package-use-list 'owner) =>  (#<PACKAGE "TEMPORARY">)

Side Effects: None.

Affected By:

The existence of otherpackages in the system.

Exceptional Situations:

The consequences are unspecified ifpackages denoted byuse do not exist.

Acorrectable error is signaled if thepackage-name or any of thenicknames is already thename ornickname of an existingpackage.

See Also:

defpackage,use-package

Notes:

In situations where thepackages to be used contain symbols which would conflict, it is necessary to first create the package with:use '(), then to useshadow orshadowing-import to address the conflicts, and then after that to useuse-package once the conflicts have been addressed.

When packages are being created as part of the static definition of a program rather than dynamically by the program, it is generally considered more stylistically appropriate to usedefpackage rather thanmake-package.


The followingX3J13 cleanup issues,not part of the specification, apply to this section:


[Starting Points][Contents][Index][Symbols][Glossary][Issues]
Copyright 1996-2005, LispWorks Ltd. All rights reserved.


[8]ページ先頭

©2009-2025 Movatter.jp