|
|
|
This would never convince a real manager, would it?
(island.net)
|
|
1 points
by centipede
6856 days ago
|
|
<b>A management perspective of the 'J' programming language - Updated 2004</b> Parts of it read like a lisper's gospel praising macros. <quote>Consider another typical case, the need to fill in a template with data from a record. This might be to create a customer statement or invoice to be mailed, an HTML form to be displayed, or some other such form. Replacing specific character locations on the template by character data from the record can do this. Where the "_" represents the characters to be replaced, code something like the following does the job.<p>into =: (# i.@#)@:=&'_'@:] }"1<p>That was the code needed when the original article was written. Now an even shorter equivalent is:<p>into =: I.@:=&'_'@:]}"1<p>This is simpler than before and incidentally, it is also faster and requires less space.<p>With a thing called "Record" containing an ASCII version of the record data with the same number of characters, as there are "_" positions on the character template called "Form". The phrase:<p>Record into Form<p>Then yields the desired result of a filled in form. </quote> |
|
Quote:
Consider another typical case, the need to fill in a template with data from a record. This might be to create a customer statement or invoice to be mailed, an HTML form to be displayed, or some other such form. Replacing specific character locations on the template by character data from the record can do this. Where the "_" represents the characters to be replaced, code something like the following does the job.
into =: (# i.@#)@:=&'_'@:] }"1
That was the code needed when the original article was written. Now an even shorter equivalent is:
into =: I.@:=&'_'@:]}"1
This is simpler than before and incidentally, it is also faster and requires less space.
With a thing called "Record" containing an ASCII version of the record data with the same number of characters, as there are "_" positions on the character template called "Form". The phrase:
Record into Form
Then yields the desired result of a filled in form.