Hi Ala'a

APL  has boolean operators for AND, for OR, for NAND, for NOR,
for EITHER-OR, = for NOT-EITHER-OR, and so on (<, ≤, >, ≥, ...).

For two boolean values A and B, there are 16 possible functions (some trivial)
with a boolean result, and for most of them there is an APL function.

If you want to execute one function only if another does not succeed (like || or  in
C++ then you can (ab-) use ⎕EA for that.

Many APL programmers use compress (/) for selecting some of several values, e.g.:

      X←(Y<0)(Y=0)(Y>0) / 'Y negative' 'Y null' 'Y positive'

/// Jürgen

On 09/17/2016 03:48 PM, Ala'a Mohammad wrote:

Some languages support short circuiting evaluation for example in Python

known([word]) or known(edits1(word)) or known(edits2(word)) or [word]

Returns the first part ( 'or' is the delimiter) that return a True
(not False of which is the empty {}, others are None 0 "" () [])

Do I need to use definition with goto/labels in APL? or How to express
this in APL?



Reply via email to