LIMIT ERROR: Difference between revisions
Miraheze>Marshall (Created page with "A '''LIMIT ERROR''' is an error message indicating that some imposed limit of the interpreter (one that is due to resource or design rather than theoretical limitations) h...") |
m (Text replacement - "</source>" to "</syntaxhighlight>") Tags: Mobile edit Mobile web edit |
||
(5 intermediate revisions by 4 users not shown) | |||
Line 1: | Line 1: | ||
A '''LIMIT ERROR''' is an [[error message]] indicating that some imposed limit of the interpreter (one that is due to resource or design rather than theoretical limitations) has prevented an operation from completing. Common cases are that a program attempted to create an array whose [[rank]] exceeds the [[maximum rank]] or whose length along one [[axis]] would exceed the maximum allowed length. In [[Dyalog APL]], the maximum rank is 15, so taking an [[Outer Product]] of two rank-8 arrays fails: | A '''LIMIT ERROR''' is an [[error message]] indicating that some imposed limit of the interpreter (one that is due to resource or design rather than theoretical limitations) has prevented an operation from completing. Common cases are that a program attempted to create an array whose [[rank]] exceeds the [[maximum rank]] or whose length along one [[axis]] would exceed the maximum allowed length. In [[Dyalog APL]], the maximum rank is 15, so taking an [[Outer Product]] of two rank-8 arrays fails: | ||
< | <syntaxhighlight lang=apl> | ||
((8⍴1)⍴2) ∘.+ ((8⍴1)⍴3) | ((8⍴1)⍴2) ∘.+ ((8⍴1)⍴3) | ||
LIMIT ERROR: Rank of resultant array would exceed maximum permitted | LIMIT ERROR: Rank of resultant array would exceed maximum permitted | ||
((8⍴1)⍴2)∘.+((8⍴1)⍴3) | ((8⍴1)⍴2)∘.+((8⍴1)⍴3) | ||
∧ | ∧ | ||
</ | </syntaxhighlight> | ||
{{Works in|[[Dyalog APL]]}} | {{Works in|[[Dyalog APL]]}} | ||
In a 64-bit interpreter, it is rare to run into an array length limit, since the maximum allowed length is usually on the order of < | In a 64-bit interpreter, it is rare to run into an array length limit, since the maximum allowed length is usually on the order of <syntaxhighlight lang=apl inline>2*64</syntaxhighlight>, and attempting to create an array this large may run into a [[DOMAIN ERROR]] or [[WS FULL]], as most machines do not have enough addressable memory to store it. [[Empty]] arrays do not need storage space, so working with arrays with one length-0 axis and one long axis can sometimes reveal a LIMIT ERROR: | ||
< | <syntaxhighlight lang=apl> | ||
((0,2*63)⍴2) , ((0,2*63)⍴3) | ((0,2*63)⍴2) , ((0,2*63)⍴3) | ||
LIMIT ERROR | LIMIT ERROR | ||
((0,2*63)⍴2),((0,2*63)⍴3) | ((0,2*63)⍴2),((0,2*63)⍴3) | ||
∧ | ∧ | ||
</ | </syntaxhighlight> | ||
{{Works in|[[Dyalog APL]]}} | {{Works in|[[Dyalog APL]]}} | ||
LIMIT ERRORs may appear when working with components outside of APL such as files. Operating system limitations are usually reported as LIMIT ERRORs, since they are caused by constraints outside of the APL interpreter's control. | LIMIT ERRORs may appear when working with components outside of APL such as files. Operating system limitations are usually reported as LIMIT ERRORs, since they are caused by constraints outside of the APL interpreter's control. | ||
{{APL | {{APL features}}[[Category:Errors]] |
Latest revision as of 22:13, 10 September 2022
A LIMIT ERROR is an error message indicating that some imposed limit of the interpreter (one that is due to resource or design rather than theoretical limitations) has prevented an operation from completing. Common cases are that a program attempted to create an array whose rank exceeds the maximum rank or whose length along one axis would exceed the maximum allowed length. In Dyalog APL, the maximum rank is 15, so taking an Outer Product of two rank-8 arrays fails:
((8⍴1)⍴2) ∘.+ ((8⍴1)⍴3) LIMIT ERROR: Rank of resultant array would exceed maximum permitted ((8⍴1)⍴2)∘.+((8⍴1)⍴3) ∧
In a 64-bit interpreter, it is rare to run into an array length limit, since the maximum allowed length is usually on the order of 2*64
, and attempting to create an array this large may run into a DOMAIN ERROR or WS FULL, as most machines do not have enough addressable memory to store it. Empty arrays do not need storage space, so working with arrays with one length-0 axis and one long axis can sometimes reveal a LIMIT ERROR:
((0,2*63)⍴2) , ((0,2*63)⍴3) LIMIT ERROR ((0,2*63)⍴2),((0,2*63)⍴3) ∧
LIMIT ERRORs may appear when working with components outside of APL such as files. Operating system limitations are usually reported as LIMIT ERRORs, since they are caused by constraints outside of the APL interpreter's control.
APL features [edit] | |
---|---|
Built-ins | Primitives (functions, operators) ∙ Quad name |
Array model | Shape ∙ Rank ∙ Depth ∙ Bound ∙ Index (Indexing) ∙ Axis ∙ Ravel ∙ Ravel order ∙ Element ∙ Scalar ∙ Vector ∙ Matrix ∙ Simple scalar ∙ Simple array ∙ Nested array ∙ Cell ∙ Major cell ∙ Subarray ∙ Empty array ∙ Prototype |
Data types | Number (Boolean, Complex number) ∙ Character (String) ∙ Box ∙ Namespace ∙ Function array |
Concepts and paradigms | Conformability (Scalar extension, Leading axis agreement) ∙ Scalar function (Pervasion) ∙ Identity element ∙ Complex floor ∙ Array ordering (Total) ∙ Tacit programming (Function composition, Close composition) ∙ Glyph ∙ Leading axis theory ∙ Major cell search ∙ First-class function |
Errors | LIMIT ERROR ∙ RANK ERROR ∙ SYNTAX ERROR ∙ DOMAIN ERROR ∙ LENGTH ERROR ∙ INDEX ERROR ∙ VALUE ERROR ∙ EVOLUTION ERROR |