Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
3
Task/Literals-String/J/literals-string-1.j
Normal file
3
Task/Literals-String/J/literals-string-1.j
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
'x' NB. Scalar character
|
||||
'string' NB. List of characters, i.e. a string
|
||||
'can''t get simpler' NB. Embedded single-quote
|
||||
7
Task/Literals-String/J/literals-string-2.j
Normal file
7
Task/Literals-String/J/literals-string-2.j
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
'Here is line 1',LF,'and line two'
|
||||
|
||||
'On a mac, you need',CR,'a carriage return'
|
||||
|
||||
'And on windows, ',CRLF,'you need both'
|
||||
|
||||
TAB,TAB,TAB,'Everyone loves tabs!'
|
||||
4
Task/Literals-String/J/literals-string-3.j
Normal file
4
Task/Literals-String/J/literals-string-3.j
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
CR =: 13 { a.
|
||||
LF =: 10 { a.
|
||||
CRLF =: CR,LF NB. Or just 10 13 { a.
|
||||
TAB =: 9 { a.
|
||||
2
Task/Literals-String/J/literals-string-4.j
Normal file
2
Task/Literals-String/J/literals-string-4.j
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
NAME =: 'John Q. Public'
|
||||
'Hello, ',NAME,' you may have already won $1,000,000'
|
||||
9
Task/Literals-String/J/literals-string-5.j
Normal file
9
Task/Literals-String/J/literals-string-5.j
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
template =: noun define
|
||||
Hello, NAME.
|
||||
|
||||
My name is SHYSTER, and I'm here to tell
|
||||
you that you my have already won $AMOUNT!!
|
||||
|
||||
To collect your winnings, please send $PAYMENT
|
||||
to ADDRESS.
|
||||
)
|
||||
12
Task/Literals-String/J/literals-string-6.j
Normal file
12
Task/Literals-String/J/literals-string-6.j
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
load 'strings'
|
||||
|
||||
name =: 'John Q. Public'
|
||||
shyster =: 'Ed McMahon'
|
||||
amount =: 1e6
|
||||
payment =: 2 * amount
|
||||
address =: 'Publisher''s Clearing House'
|
||||
|
||||
targets =: ;: 'NAME SHYSTER AMOUNT PAYMENT ADDRESS'
|
||||
sources =: ":&.> name;shyster;amount;payment;address
|
||||
|
||||
message =: template rplc targets,.sources
|
||||
5
Task/Literals-String/J/literals-string-7.j
Normal file
5
Task/Literals-String/J/literals-string-7.j
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
load 'printf'
|
||||
|
||||
'This should look %d%% familiar \nto programmers of %s.' sprintf 99;'C'
|
||||
This should look 99% familiar
|
||||
to programmers of C.
|
||||
Loading…
Add table
Add a link
Reference in a new issue