APLX Help : Help on APL language : System Functions & Variables : ⎕EVAL Evaluate external expression




The dyadic system function The left argument is a character vector which specifies the external environment in which you want to evaluate the expression, in the same format as for The main use for 'ruby' ⎕EVAL 's=String.new "Hello there"' Hello there 'ruby' ⎕EVAL 's.length' 11 'ruby' ⎕EVAL 'Math.sqrt(9)' 3 This example shows in the R environment: r←'r' ⎕new 'r' r.x←2 3⍴⍳6 ⍝ x is an R variable r.x 1 2 3 4 5 6 'r' ⎕eval 'x[2,]' 4 5 6 'r' ⎕eval 'mean(x[2,])' 5 Note that the last line could be executed using the alternative syntax: r.⎕eval 'mean(x[2,])' 5
'.net' ⎕EVAL '2+2' Library for architecture '.net' does not support direct evaluation DOMAIN ERROR '.net' ⎕EVAL '2+2' ^ See also 

APLX Help : Help on APL language : System Functions & Variables : ⎕EVAL Evaluate external expression

Copyright © 19962010 MicroAPL Ltd