Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

scripting languages

Name: Anonymous 2012-10-14 19:46

What's your goto scripting language and how do you justify it?

Name: Anonymous 2012-10-15 2:54

>>13
This is a typical example of APL, a library function for reading a file. → is branch and ⍎ is execute, the only forms of control flow in APL.
Z←READFILEV N;A;B;C;D;E;F
⍝ Read file N and return records as vector of arrays.
⍝ N has a syntax of '["][path]filename["][ ,code]'
⍝ code defaults to code D(ASCII), but code A(APL2) and code T(Translate)
⍝ may be specified.
(F←1)OPEN N←((⌽∨\⌽' '≠N)/N),(~','∊N)/',D'
B←',A'≡¯2↑N
Z←'' ⍝ Initialise result
C←0 ⍝ Record counter for ASCII file
D←128 ⍝ Initial scan length
L0:⍎'CZ',(⍕F),'←6'
L4:¯44 ¯45 ¯46 ∆CHK E←⍎'CZ',⍕F
→(((~B)^E=¯44),E=¯45)/L2,L3
A←⍎'DZ',⍕F
→B/L1
C←C+1
L1:Z←Z,⊂A
→L0
L2:
→L4,⍎'CZ',(⍕F),'←6,C,D←2×D' ⍝ Double scan length
L3:CLOSE F
→B/0 ⍝ Exit if not ASCII file
Z←(-(⎕AF 26)=↑↑¯1↑Z)↓Z ⍝ Remove EOF record (if there)

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List