User Tools


====== Function UPGRADED-ARRAY-ELEMENT-TYPE ====== ====Syntax==== * **upgraded-array-element-type** //typespec ''&optional'' environment// → //upgraded-typespec// ====Arguments and Values==== * //typespec// - a //[[CL:Glossary:type specifier]]//. * //environment// - an //[[CL:Glossary:environment]]// //[[CL:Glossary:object]]//. The default is **[[CL:Constant Variables:nil]]**, denoting the //[[CL:Glossary:null lexical environment]]// and the current //[[CL:Glossary:global environment]]//. * //upgraded-typespec// - a //[[CL:Glossary:type specifier]]//. ====Description==== Returns the //[[CL:Glossary:element type]]// of the most //[[CL:Glossary:specialized]]// //[[CL:Glossary:array]]// representation capable of holding items of the //[[CL:Glossary:type]]// denoted by //typespec//. The //typespec// is a //[[CL:Glossary:subtype]]// of (and possibly //[[CL:Glossary:type equivalent]]// to) the //upgraded-typespec//. If //typespec// is **[[CL:Types:bit]]**, the result is //[[CL:Glossary:type equivalent]]// to ''bit''. If //typespec// is **[[CL:Types:base-char]]**, the result is //[[CL:Glossary:type equivalent]]// to ''base-char''. If //typespec// is **[[CL:Types:character]]**, the result is //[[CL:Glossary:type equivalent]]// to ''character''. The purpose of **upgraded-array-element-type** is to reveal how an implementation does its //[[CL:Glossary:upgrade|upgrading]]//. The //environment// is used to expand any //[[CL:Glossary:derived type specifiers]]// that are mentioned in the //typespec//. ====Examples==== None. ====Side Effects==== None. ====Affected By==== None. ====Exceptional Situations==== None. ====See Also==== **[[CL:Functions:array-element-type|Function ARRAY-ELEMENT-TYPE]]**, **[[CL:Functions:make-array|Function MAKE-ARRAY]]** ====Notes==== Except for storage allocation consequences and dealing correctly with the optional //environment// //[[CL:Glossary:argument]]//, **upgraded-array-element-type** could be defined as: <blockquote> ([[CL:Macros:defun]] upgraded-array-element-type (type &optional environment) ([[CL:Functions:array-element-type]] ([[CL:Functions:make-array]] 0 :element-type type))) </blockquote> \issue{SUBTYPEP-ENVIRONMENT:ADD-ARG} \issue{ARRAY-TYPE-ELEMENT-TYPE-SEMANTICS:UNIFY-UPGRADING} \issue{CHARACTER-VS-CHAR:LESS-INCONSISTENT-SHORT}