Another update from ingydotnet^djgoku
This commit is contained in:
parent
91df62d461
commit
948b86eafa
7604 changed files with 108452 additions and 22726 deletions
6
Task/Character-codes/ALGOL-W/character-codes.alg
Normal file
6
Task/Character-codes/ALGOL-W/character-codes.alg
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
begin
|
||||
% display the character code of "a" (97 in ASCII) %
|
||||
write( decode( "a" ) );
|
||||
% display the character corresponding to 97 ("a" in ASCII) %
|
||||
write( code( 97 ) );
|
||||
end.
|
||||
|
|
@ -0,0 +1,2 @@
|
|||
log(id of "a")
|
||||
log(id of "aA")
|
||||
|
|
@ -1,7 +1,9 @@
|
|||
#define system.
|
||||
|
||||
#symbol Program =>
|
||||
#symbol program =>
|
||||
[
|
||||
console write:("a" getAt:0 Number).
|
||||
console write:(CharValue new &short:97).
|
||||
#var ch := #97.
|
||||
|
||||
console writeLine:ch.
|
||||
console writeLine:(ch int).
|
||||
].
|
||||
|
|
|
|||
4
Task/Character-codes/Elixir/character-codes.elixir
Normal file
4
Task/Character-codes/Elixir/character-codes.elixir
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
iex(1)> code = ?a
|
||||
97
|
||||
iex(2)> to_string([code])
|
||||
"a"
|
||||
2
Task/Character-codes/J/character-codes-2.j
Normal file
2
Task/Character-codes/J/character-codes-2.j
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
3 u: 'abc☺'
|
||||
97 98 99 226 152 186
|
||||
4
Task/Character-codes/J/character-codes-3.j
Normal file
4
Task/Character-codes/J/character-codes-3.j
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
97 98 99{a.
|
||||
abc
|
||||
a.i.'abc'
|
||||
97 98 99
|
||||
1
Task/Character-codes/JavaScript/character-codes-2.js
Normal file
1
Task/Character-codes/JavaScript/character-codes-2.js
Normal file
|
|
@ -0,0 +1 @@
|
|||
['字'.codePointAt(0), '🐘'.codePointAt(0)]
|
||||
1
Task/Character-codes/JavaScript/character-codes-3.js
Normal file
1
Task/Character-codes/JavaScript/character-codes-3.js
Normal file
|
|
@ -0,0 +1 @@
|
|||
[23383, 128024]
|
||||
3
Task/Character-codes/JavaScript/character-codes-4.js
Normal file
3
Task/Character-codes/JavaScript/character-codes-4.js
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
[23383, 128024].map(function (x) {
|
||||
return String.fromCodePoint(x);
|
||||
})
|
||||
1
Task/Character-codes/JavaScript/character-codes-5.js
Normal file
1
Task/Character-codes/JavaScript/character-codes-5.js
Normal file
|
|
@ -0,0 +1 @@
|
|||
["字", "🐘"]
|
||||
14
Task/Character-codes/REXX/character-codes-2.rexx
Normal file
14
Task/Character-codes/REXX/character-codes-2.rexx
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
/* REXX */
|
||||
yyy='c' /*assign a lowercase c to YYY */
|
||||
yyy='83'x /*assign hexadecimal 83 to YYY */
|
||||
/*the X can be upper/lowercase.*/
|
||||
yyy=x2c(83) /* (same as above) */
|
||||
yyy='10000011'b /* (same as above) */
|
||||
yyy='1000 0011'b /* (same as above) */
|
||||
/*the B can be upper/lowercase.*/
|
||||
yyy=d2c(129) /*assign decimal code 129 to YYY */
|
||||
|
||||
say yyy /*displays the value of YYY */
|
||||
say c2x(yyy) /*displays the value of YYY in hexadecimal. */
|
||||
say c2d(yyy) /*displays the value of YYY in decimal. */
|
||||
say x2b(c2x(yyy))/*displays the value of YYY in binary (bit string). */
|
||||
2
Task/Character-codes/RapidQ/character-codes.rapidq
Normal file
2
Task/Character-codes/RapidQ/character-codes.rapidq
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
Print Chr$(97)
|
||||
Print Asc("a")
|
||||
11
Task/Character-codes/Rust/character-codes.rust
Normal file
11
Task/Character-codes/Rust/character-codes.rust
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
use std::char::from_u32;
|
||||
|
||||
fn main() {
|
||||
//ascii char
|
||||
println!("{}", 'a' as u8);
|
||||
println!("{}", 97 as char);
|
||||
|
||||
//unicode char
|
||||
println!("{}", 'π' as u32);
|
||||
println!("{}", from_u32(960).unwrap();
|
||||
}
|
||||
5
Task/Character-codes/VBScript/character-codes.vb
Normal file
5
Task/Character-codes/VBScript/character-codes.vb
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
'prints a
|
||||
WScript.StdOut.WriteLine Chr(97)
|
||||
|
||||
'prints 97
|
||||
WScript.StdOut.WriteLine Asc("a")
|
||||
Loading…
Add table
Add a link
Reference in a new issue