Del: Difference between revisions

From APL Wiki
Jump to navigation Jump to search
No edit summary
m (Text replacement - "<source" to "<syntaxhighlight")
Tags: Mobile edit Mobile web edit
 
(One intermediate revision by the same user not shown)
Line 2: Line 2:
The [[glyph]] '''del''' is a triangular symbol resembling an inverted Greek [[wikipedia:delta (letter)|delta]] and is represented by the [[Unicode]] character <code>∇</code>, "nabla". Its uses include:
The [[glyph]] '''del''' is a triangular symbol resembling an inverted Greek [[wikipedia:delta (letter)|delta]] and is represented by the [[Unicode]] character <code>∇</code>, "nabla". Its uses include:
* In [[APL\360]] and most other APLs, it is used to enter and exit the [[wikipedia:line editor|line editor]] which provides a function definition mode.<ref>[[Dyalog Ltd.]] Programming Reference Guide. [https://help.dyalog.com/latest/#Language/Defined%20Functions%20and%20Operators/TradFns/APL%20Line%20Editor.htm APL Line Editor].</ref>
* In [[APL\360]] and most other APLs, it is used to enter and exit the [[wikipedia:line editor|line editor]] which provides a function definition mode.<ref>[[Dyalog Ltd.]] Programming Reference Guide. [https://help.dyalog.com/latest/#Language/Defined%20Functions%20and%20Operators/TradFns/APL%20Line%20Editor.htm APL Line Editor].</ref>
* In [[Dyalog APL]], [[NARS2000]], [[ngn/apl]], and [[dzaima/APL]] <source lang=apl inline>∇</source> represents the current [[dfn]], or the function derived from the current [[dop]], such that anonymous functions and operators may [[wikipedia:recursion (computer science)|recurse]].<ref>[[Dyalog Ltd.]] Programming Reference Guide. [https://help.dyalog.com/latest/#Language/Defined%20Functions%20and%20Operators/DynamicFunctions/Recursion.htm Recursion].</ref>
* In [[Dyalog APL]], [[NARS2000]], [[ngn/apl]], and [[dzaima/APL]] <syntaxhighlight lang=apl inline>∇</syntaxhighlight> represents the current [[dfn]], or the function derived from the current [[dop]], such that anonymous functions and operators may [[wikipedia:recursion (computer science)|recurse]].<ref>[[Dyalog Ltd.]] Programming Reference Guide. [https://help.dyalog.com/latest/#Language/Defined%20Functions%20and%20Operators/DynamicFunctions/Recursion.htm Recursion].</ref>
* In [[Dyalog APL]], <source lang=apl inline>∇</source> is used to delimit [[tradfn]] members of scripted [[object oriented programming|objects]].<ref>[[Dyalog Ltd.]] Programming Reference Guide. [https://help.dyalog.com/latest/#Language/Object%20Oriented%20Programming/Class%20Members/Methods/Methods.htm Methods].</ref>
* In [[Dyalog APL]], <syntaxhighlight lang=apl inline>∇</syntaxhighlight> is used to delimit [[tradfn]] members of scripted [[object oriented programming|objects]].<ref>[[Dyalog Ltd.]] Programming Reference Guide. [https://help.dyalog.com/latest/#Language/Object%20Oriented%20Programming/Class%20Members/Methods/Methods.htm Methods].</ref>
* In [[APL2]], [[APLX]], and [[APL*PLUS]], a variant glyph <source lang=apl inline>⍫</source>, consisting of a Del <source lang=apl inline>∇</source> overstruck with a Tilde <source lang=apl inline>~</source>, is used instead of the closing <source lang=apl inline>∇</source> to "lock" the function definition. This prevents viewing or modifying the function's definition while still allowing the function to run. <ref>[[MicroAPL]]. APLX Help. [http://microapl.com/apl_help/ch_020_010_070.htm User-defined Functions].</ref> [[Dyalog APL]] instead offers the [[Lock Definition]] (<source lang=apl inline>⎕LOCK</source>) [[system function]] which provides a more fine-grained management of locked behaviour.<ref>[[Dyalog Ltd.]] Language Reference Guide. [https://help.dyalog.com/latest/#Language/System%20Functions/lock.htm Lock Definition].</ref>
* In [[APL2]], [[APLX]], and [[APL*PLUS]], a variant glyph <syntaxhighlight lang=apl inline>⍫</syntaxhighlight>, consisting of a Del <syntaxhighlight lang=apl inline>∇</syntaxhighlight> overstruck with a Tilde <syntaxhighlight lang=apl inline>~</syntaxhighlight>, is used instead of the closing <syntaxhighlight lang=apl inline>∇</syntaxhighlight> to "lock" the function definition. This prevents viewing or modifying the function's definition while still allowing the function to run. <ref>[[MicroAPL]]. APLX Help. [http://microapl.com/apl_help/ch_020_010_070.htm User-defined Functions].</ref> [[Dyalog APL]] instead offers the [[Lock Definition]] (<syntaxhighlight lang=apl inline>⎕LOCK</syntaxhighlight>) [[system function]] which provides a more fine-grained management of locked behaviour.<ref>[[Dyalog Ltd.]] Language Reference Guide. [https://help.dyalog.com/latest/#Language/System%20Functions/lock.htm Lock Definition].</ref>
* In [[APL*PLUS]], <source lang=apl inline>⍝∇</source> marks a special "public comment" which can be retrieved with a dedicated system function even when the function is locked. This is also used to distinguish internal documentation from other comments.
* In [[APL*PLUS]], <syntaxhighlight lang=apl inline>⍝∇</syntaxhighlight> marks a special "public comment" which can be retrieved with a dedicated system function even when the function is locked. This is also used to distinguish internal documentation from other comments.
It should be noted that Del (<source lang=apl inline>∇</source>) has no connection to Delta (<source lang=apl inline>∆</source>) other than visual similarity. The latter is treated as a normal [[wikipedia:identifier (computer languages)|identifier]] character in all respects.
It should be noted that Del (<syntaxhighlight lang=apl inline>∇</syntaxhighlight>) has no connection to Delta (<syntaxhighlight lang=apl inline>∆</syntaxhighlight>) other than visual similarity. The latter is treated as a normal [[wikipedia:identifier (computer languages)|identifier]] character in all respects.
== References ==
== References ==
<references/>
<references/>
{{APL glyphs}}[[Category:Glyphs]]
{{APL glyphs}}[[Category:Glyphs]]

Latest revision as of 22:28, 10 September 2022

The glyph del is a triangular symbol resembling an inverted Greek delta and is represented by the Unicode character , "nabla". Its uses include:

  • In APL\360 and most other APLs, it is used to enter and exit the line editor which provides a function definition mode.[1]
  • In Dyalog APL, NARS2000, ngn/apl, and dzaima/APL represents the current dfn, or the function derived from the current dop, such that anonymous functions and operators may recurse.[2]
  • In Dyalog APL, is used to delimit tradfn members of scripted objects.[3]
  • In APL2, APLX, and APL*PLUS, a variant glyph , consisting of a Del overstruck with a Tilde ~, is used instead of the closing to "lock" the function definition. This prevents viewing or modifying the function's definition while still allowing the function to run. [4] Dyalog APL instead offers the Lock Definition (⎕LOCK) system function which provides a more fine-grained management of locked behaviour.[5]
  • In APL*PLUS, ⍝∇ marks a special "public comment" which can be retrieved with a dedicated system function even when the function is locked. This is also used to distinguish internal documentation from other comments.

It should be noted that Del () has no connection to Delta () other than visual similarity. The latter is treated as a normal identifier character in all respects.

References

  1. Dyalog Ltd. Programming Reference Guide. APL Line Editor.
  2. Dyalog Ltd. Programming Reference Guide. Recursion.
  3. Dyalog Ltd. Programming Reference Guide. Methods.
  4. MicroAPL. APLX Help. User-defined Functions.
  5. Dyalog Ltd. Language Reference Guide. Lock Definition.
APL glyphs [edit]
Information GlyphTyping glyphs (on Linux) ∙ UnicodeFontsMnemonicsOverstrikesMigration level
Individual glyphs Jot () ∙ Right Shoe () ∙ Up Arrow () ∙ Zilde () ∙ High minus (¯) ∙ Dot (.) ∙ Del ()