⍝ Quad_ES.tc
⍝ ----------------------------------

⍝ monadic, character B ----------------------------------

      )ERASE EXPO

∇Z←EXPO A
 ⎕ES(0=A)/'ZERO INVALID'
 Z←⋆A
∇

      EXPO 3
20.08553692

      EXPO 0
ZERO INVALID
      EXPO 0
      ^    ^

      ⎕EM
ZERO INVALID
      EXPO 0
      ^    ^

      ⎕ET
0 1

      →

⍝ monadic, integer B, B is a defined error ----------------------------------

      )ERASE FACTR
∇Z←FACTR A
 ⎕ES(0=A)/5 4
 Z←!A
∇

      FACTR 3
6

      FACTR 0
DOMAIN ERROR
      FACTR 0
      ^     ^

      ⎕EM
DOMAIN ERROR 
      FACTR 0
      ^     ^

      ⎕ET
5 4

      →

⍝ monadic, B is 0 0 ----------------------------------

      )ERASE FN
∇FN
 ⎕ES 0 0              ⍝ Resets ⎕EM and ⎕ET
 ⎕ET                  ⍝ print event type:            0 0

 '2+3' ⎕EA 'A←B)←2)'  ⍝ Causes a syntax error, print 5
 ⎕ET                  ⍝ print event type:            2 2

 ⎕ES 0 0              ⍝ Resets ⎕EM and ⎕ET
 ⎕ET                  ⍝ print event type:            0 0
∇

      )CHECK
OK      - no stale functions
OK      - no stale values
OK      - no stale indices
OK      - no duplicate parents


      FN
0 0
5
2 2
0 0


⍝ monadic, B is not a defined error ----------------------------------

∇Z←RECIP A
 ⎕ES(0=A)/13 17
 Z←÷A
∇

      RECIP 3
0.3333333333

      RECIP 0
Unkown error (major 13, minor 17) in ⎕ES B
      RECIP 0
      ^     ^

      ⎕EM
Unkown error (major 13, minor 17) in ⎕ES B
      RECIP 0                             
      ^     ^                             

      ⍴⎕EM
3 42

      ⎕ET
13 17

      →

⍝ dyadic ----------------------------------

      'ERROR SIMULATION' ⎕ES 101 9
ERROR SIMULATION
      'ERROR SIMULATION' ⎕ES 101 9
      ^                  ^

      ⎕EM
ERROR SIMULATION                  
      'ERROR SIMULATION' ⎕ES 101 9
      ^                  ^        

      ⎕ET
101 9

      →

⍝ dyadic, integer B, B is a defined error ----------------------------------

      )ERASE FACTR
∇Z←FACTR A
'ZERO INVALID' ⎕ES(0=A)/5 4
 Z←!A
∇


      FACTR 4
24

      FACTR 0
ZERO INVALID
      FACTR 0
      ^     ^

      ⎕EM
ZERO INVALID 
      FACTR 0
      ^     ^

      ⎕ET
5 4

      →

⍝ dyadic, B is 0 0 ----------------------------------

      )ERASE FN
∇FN
                        ⍝ OUTPUT   COMMENT
 'HELLO' ⎕ES 0 0        ⍝          Resets ⎕EM and ⎕ET
 ⎕ET                    ⍝ 0 0
                        ⍝
 '2+3' ⎕EA 'A←B)←2)'    ⍝ 5        Causes a syntax error
 ⎕ET                    ⍝ 2 2      Reports 2 2 as the event type
                        ⍝
 'WORLD'⎕ES 0 0         ⍝          Resets ⎕EM and ⎕ET
 ⎕ET                    ⍝ 0 0      Shows ⎕ET reset to 0 0
 'DONE'                 ⍝ DONE
∇

      FN
0 0
5
2 2
0 0
DONE

      ]EXPECT 1

⍝ ==================================

