[6] L←(Lι':')↓L←,L ⍝ drop To: [7] L←LJUST VTOM',',L ⍝ mat with one entry per row [8] S←¯1++/∧\L≠'(' ⍝ length of address [9] X←0⌈⌈/S [10] L←S⌽(−(⍴L)+0,X)↑L ⍝ align the (names) [11] A←((1↑⍴L),X)↑L ⍝ address [12] N←0 1↓DLTB(0,X)↓L ⍝ names) [13] N←,'⍺',N [14] N[(N='_')/ι⍴N]←' ' ⍝ change _ to blank [15] N←0 ¯1↓RJUST VTOM N ⍝ names [16] S←+/∧\' '≠⌽N ⍝ length of last word in name
- which is difficult to understand even with the comments to the right of each line of code.
On the other hand, there are descriptive languages like COBOL, which was designed to read like English, presumably so that managers of any intelligence or accountants could gain at least a superficial understanding of what a program did. My favourite on the Listverse list is therefore Shakespeare, which is surely inspired by COBOL:
The first line in a Shakespeare program is called the “title” and acts as a comment. The “Dramatis Personae” is the section
where variables are declared. Each variable name must be the name of a character from a Shakespeare play.
where variables are declared. Each variable name must be the name of a character from a Shakespeare play.
A piece of code in Shakespeare is broken into “Acts”, which contain “Scenes”, in which characters (variables) interact.
Each Act and Scene is numbered with a roman numeral and serves as a GOTO label. They are written in the form:
Each Act and Scene is numbered with a roman numeral and serves as a GOTO label. They are written in the form:
Act I: Hamlet’s insults and flattery.
Scene I: The insulting of Romeo.
Scene I: The insulting of Romeo.
Before “characters” (variables) can “act” (be acted upon) they must first be “on stage”.
To call a variable to the stage the “Enter” command is used. To tell characters to leave the stage, use the “Exit” command.
“Exeunt” calls more than one character to leave, or in the case that no characters are listed all the characters
will leave the stage.
To call a variable to the stage the “Enter” command is used. To tell characters to leave the stage, use the “Exit” command.
“Exeunt” calls more than one character to leave, or in the case that no characters are listed all the characters
will leave the stage.
I look forward to the movie (cinema, TV or Netflix) where the technical consultant manages to insinuate a screenful of INTERCAL at a critical point in the plot.
No comments:
Post a Comment