exit←{                              ⍝ Return to calling environment.
    log←⎕SE.⎕WG'Log'                ⍝ session log.
    sos ipt←'Dyalog APL' '      '   ⍝ start of session marker and prompt.
    take←{⍺↑⍵,⎕UCS 0}               ⍝ distinguishes '' from '      '.
    indx←{((⍴⍵)take¨⍺)⍳⊂⍵}          ⍝ index of first ⍵ in ⍺
    hits(⊂⌽log)indx¨ipt sos        ⍝ indices of input prompt and banner.
    off(>/hits)/'⎕OFF'             ⍝ '⎕OFF ' unless interactive session.
    off,' ',⍕⍵                      ⍝ return vector for ⍎.
}

code_colours

test script

Back to: notes

Back to: Workspaces