Show ASCII table: Difference between revisions
→{{header|langur}}
m (→{{header|K}}) |
Langurmonkey (talk | contribs) |
||
(10 intermediate revisions by 7 users not shown) | |||
Line 2,186:
46 : . 62 : > 78 : N 94 : ^ 110 : n 126 : ~
47 : / 63 : ? 79 : O 95 : _ 111 : o 127 : Del</pre>
=={{header|EasyLang}}==
{{trans|AWK}}
<syntaxhighlight lang="easylang">
numfmt 0 3
for i range0 16
elif j = 127
else
x$ = strchar j & " "
write j & ": " & x$
.
print ""
.
</syntaxhighlight>
=={{header|Ecstasy}}==
<syntaxhighlight lang="java">
module
▲ {
@Inject Console console;
void run() {
for (Int offset : 0..<16) {
for (Int ascii = 32+offset;
▲ {
▲ {
console.print($|{ascii.toString().rightJustify(3)}/\
|{ascii.toByte().toByteArray()}: \
|{new Char(ascii).quoted().leftJustify(5)}
, suppressNewline=True);
▲ }
console.print();▼
}
▲ console.print();
}
}
}
</syntaxhighlight>
Line 3,061 ⟶ 3,077:
=={{header|Fōrmulæ}}==
{{FormulaeEntry|page=https://formulae.org/?script=examples/Show_ASCII_table}}
'''Solution'''
[[File:Fōrmulæ - Show ASCII table 01.png]]
[[File:Fōrmulæ - Show ASCII table 02.png]]
=={{header|FutureBasic}}==
Line 3,073 ⟶ 3,090:
local fn ASCIITable as CFStringRef
NSinteger i▼
CFStringRef temp▼
▲NSinteger i
▲CFStringRef temp
CFMutableStringRef mutStr = fn MutableStringWithCapacity( 0 )▼
▲CFMutableStringRef mutStr = fn MutableStringWithCapacity( 0 )
temp = fn StringWithFormat( @"%c", i )▼
▲for i = 32 to 127
▲temp = fn StringWithFormat( @"%c", i )
if i ==
MutableStringAppendString( mutStr, fn StringWithFormat( @"%-1d : %@\n", i, temp ) )▼
▲if i == 127 then temp = @"Del"
next▼
▲MutableStringAppendString( mutStr, fn StringWithFormat( @"%-1d : %@\n", i, temp ) )
▲next
CFArrayRef colArr = fn StringComponentsSeparatedByString( mutStr, @"\n" )
for i = 0 to 15
▲for i = 0 to 15
ObjectRef
ObjectRef
ObjectRef
ObjectRef
ObjectRef
MutableStringAppendString( mutStr, fn StringWithFormat( @"%-10s %-10s %-10s %-10s %-10s %-10s\n", col0, col1, col2, col3, col4, col5 ) )▼
▲ObjectRef col5 = fn StringUTF8String( fn ArrayObjectAtIndex( colArr, i + 80 ) )
next▼
▲MutableStringAppendString( mutStr, fn StringWithFormat( @"%-10s %-10s %-10s %-10s %-10s %-10s\n", col0, col1, col2, col3, col4, col5 ) )
▲next
end fn = fn StringWithString( mutStr )
Line 3,121 ⟶ 3,137:
47 : / 63 : ? 79 : O 95 : _ 111 : o 127 : Del
</pre>
=={{header|Go}}==
Line 3,249 ⟶ 3,264:
46 : . 62 : > 78 : N 94 : ^ 110 : n 126 : ~
47 : / 63 : ? 79 : O 95 : _ 111 : o 127 : Del </pre>
=={{Header|Insitux}}==
<syntaxhighlight lang="insitux">
(-> (for i (range 16)
j (range (+ i 32) 128 16)
(let k (match j 32 "Spc" 127 "Del" (str (char-code j) " ")))
(strn ((< j 100) " ") j " : " k))
(partition 6)
(map (join " "))
(join "\n"))
</syntaxhighlight>
{{out}}
<pre>
32 : Spc 48 : 0 64 : @ 80 : P 96 : ` 112 : p
33 : ! 49 : 1 65 : A 81 : Q 97 : a 113 : q
34 : " 50 : 2 66 : B 82 : R 98 : b 114 : r
35 : # 51 : 3 67 : C 83 : S 99 : c 115 : s
36 : $ 52 : 4 68 : D 84 : T 100 : d 116 : t
37 : % 53 : 5 69 : E 85 : U 101 : e 117 : u
38 : & 54 : 6 70 : F 86 : V 102 : f 118 : v
39 : ' 55 : 7 71 : G 87 : W 103 : g 119 : w
40 : ( 56 : 8 72 : H 88 : X 104 : h 120 : x
41 : ) 57 : 9 73 : I 89 : Y 105 : i 121 : y
42 : * 58 : : 74 : J 90 : Z 106 : j 122 : z
43 : + 59 : ; 75 : K 91 : [ 107 : k 123 : {
44 : , 60 : < 76 : L 92 : \ 108 : l 124 : |
45 : - 61 : = 77 : M 93 : ] 109 : m 125 : }
46 : . 62 : > 78 : N 94 : ^ 110 : n 126 : ~
47 : / 63 : ? 79 : O 95 : _ 111 : o 127 : Del
</pre>
=={{header|J}}==
Line 3,947 ⟶ 3,992:
=={{header|K}}==
{{works with|ngn/k}}
<syntaxhighlight lang=K>`0:"\n"/" "/'+6 16#{-6
32 48 0 64 @ 80 P 96 ` 112 p
33 ! 49 1 65 A 81 Q 97 a 113 q
Line 4,088 ⟶ 4,133:
=={{header|langur}}==
{{trans|Go}}
<syntaxhighlight lang="langur">for .i of 16 {
for .j = 31 + .i ; .j < 128 ; .j += 16 {
val .L =
write $"\{.j:3
}
writeln()
Line 6,110 ⟶ 6,154:
{{trans|Go}}
{{libheader|Wren-fmt}}
<syntaxhighlight lang="
for (i in 0...16) {
|