Skip to content

Hackers' Corner: DOS Environment Variables

Vector 6:2, page 115

system interfaces programming techniques

Transcribed from the printed issue; not yet reviewed. Read it in the PDF of the issue, page 115

What is all this hacking around with Program Segment Prefixes? Has anybody tried to do this in APL*PLUS II? No? - Good, because it doesn’t work. However, try the following which does work in both APL*PLUS/PC and APL*PLUS II:

     ∇Z←DOS∆ENV
[1]   ⎕CMD 'SET > SETOUT.TXT'
[2]   'SETOUT.TXT' ⎕NTIE 158
[3]   Z←⎕NREAD 158 82,(¯1+⎕NSIZE 158),0
[4]   ⎕NUNTIE 158
[5]   ⎕CMD 'DEL SETOUT.TXT'
[6]   Z←SSTOMAT ⎕TCNL,Z~⎕TCLF
     ∇

Where SStoMAT is supplied in STSC’s ASMFNS and is the equivalent of your ∆TAB.