Execute: Difference between revisions
Jump to navigation
Jump to search
m (Text replacement - "{{APL built-ins}}" to "{{APL built-ins}}Category:Primitive functions") |
|||
Line 18: | Line 18: | ||
42 | 42 | ||
</source> | </source> | ||
== See also == | |||
* [[Format]] | |||
== External links == | |||
=== Documentation === | |||
* [https://help.dyalog.com/latest/#Language/Primitive%20Functions/Execute.htm Dyalog] | |||
* [http://microapl.com/apl_help/ch_020_020_710.htm APLX] | |||
{{APL built-ins}}[[Category:Primitive functions]] | {{APL built-ins}}[[Category:Primitive functions]] |
Revision as of 10:23, 9 July 2020
⍎
|
Execute (⍎
) is a primitive function that evaluates a string as APL code.
It should be noted that executing user-provided data is not safe. Some implementations provide alternative safe functionality through the system functions Verify Input (⎕VI
) and Fix Input (⎕FI
)or the combined function Verify and Fix Input (⎕VFI
).
Examples
⍎'⍳10' 1 2 3 4 5 6 7 8 9 10
A common use for this is to assign a value using a name given by a variable:
varName←'myVar' myValue←42 {⍎varName,'←⍵'}myValue varName myVar myVar 42