bug-apl
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Bug-apl] ERR function in APL2?


From: Elias Mårtenson
Subject: [Bug-apl] ERR function in APL2?
Date: Mon, 4 Aug 2014 14:13:26 +0800

I was browsing the APL2 documentation, and came across the following code (page 56, on the PDF here):

[0]  Z←NAME GETW N
[1] ⍝ GET ITEMS N FROM THE TABLE NAMED NAME
[2]  Z←''
[3]  →('NOT A VALID TABLE NAME' ERR~(⊂NAME)∊TABLES)/0
[4]  TAB←⍎NAME
[5]  B←N∊TAB[;1]
[6]  →0ρ('ITEM(S)'((~B)/N)'NOT FOUND')ERR~^/B
[7]  →(~∨/B)/0  ⍝ EXIT IF NONE FOUND
[8]  Z←(TAB[;1]∊N)⌿›TAB

What is ERR here?  It seems like a function that sets some error state? It certainly looks like something useful to have. I can't think of any way I could build this myself though.

Regards,
Elias

reply via email to

[Prev in Thread] Current Thread [Next in Thread]