Data update
This commit is contained in:
parent
4bb20c9b71
commit
cbaf4c4b64
12390 changed files with 318560 additions and 27248 deletions
6
Task/Character-codes/Ada/character-codes.adb
Normal file
6
Task/Character-codes/Ada/character-codes.adb
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
with Ada.Text_IO; use Ada.Text_IO;
|
||||
|
||||
procedure Char_Code is
|
||||
begin
|
||||
Put_Line (Character'Val (97) & " =" & Integer'Image (Character'Pos ('a')));
|
||||
end Char_Code;
|
||||
2
Task/Character-codes/Agena/character-codes.agena
Normal file
2
Task/Character-codes/Agena/character-codes.agena
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
print( abs "a" ); # prints the character code of a (97 in ASCII)
|
||||
print( char( 97 ) ); # prints the character corresponding to code 97 ("a" in ASCII)
|
||||
4
Task/Character-codes/ArkScript/character-codes.ark
Normal file
4
Task/Character-codes/ArkScript/character-codes.ark
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
(import std.String)
|
||||
|
||||
(print (string:ord "a"))
|
||||
(print (string:chr 97))
|
||||
9
Task/Character-codes/COBOL/character-codes.cob
Normal file
9
Task/Character-codes/COBOL/character-codes.cob
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
identification division.
|
||||
program-id. character-codes.
|
||||
remarks. COBOL is an ordinal language, first is 1.
|
||||
remarks. 42nd ASCII code is ")" not, "*".
|
||||
procedure division.
|
||||
display function char(42)
|
||||
display function ord('*')
|
||||
goback.
|
||||
end program character-codes.
|
||||
2
Task/Character-codes/Emacs-Lisp/character-codes.el
Normal file
2
Task/Character-codes/Emacs-Lisp/character-codes.el
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
(string-to-char "a") ;=> 97
|
||||
(format "%c" 97) ;=> "a"
|
||||
2
Task/Character-codes/Euphoria/character-codes.eu
Normal file
2
Task/Character-codes/Euphoria/character-codes.eu
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
printf(1,"%d\n", 'a') -- prints "97"
|
||||
printf(1,"%s\n", 97) -- prints "a"
|
||||
7
Task/Character-codes/Haxe/character-codes.hx
Normal file
7
Task/Character-codes/Haxe/character-codes.hx
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
class Main {
|
||||
static public function main():Void {
|
||||
trace("a".code);
|
||||
trace("∅".code);
|
||||
trace("🍆".code);
|
||||
}
|
||||
}
|
||||
11
Task/Character-codes/Odin/character-codes.odin
Normal file
11
Task/Character-codes/Odin/character-codes.odin
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
package main
|
||||
|
||||
import "core:fmt"
|
||||
|
||||
main :: proc() {
|
||||
// No difference between chracters and ints
|
||||
a:int=97
|
||||
fmt.println(rune(a))
|
||||
number:int='a'
|
||||
fmt.println(number)
|
||||
}
|
||||
1
Task/Character-codes/PowerShell/character-codes-1.ps1
Normal file
1
Task/Character-codes/PowerShell/character-codes-1.ps1
Normal file
|
|
@ -0,0 +1 @@
|
|||
$char = [convert]::toChar(0x2f) #=> /
|
||||
1
Task/Character-codes/PowerShell/character-codes-2.ps1
Normal file
1
Task/Character-codes/PowerShell/character-codes-2.ps1
Normal file
|
|
@ -0,0 +1 @@
|
|||
$char = [char] 'a'
|
||||
1
Task/Character-codes/PowerShell/character-codes-3.ps1
Normal file
1
Task/Character-codes/PowerShell/character-codes-3.ps1
Normal file
|
|
@ -0,0 +1 @@
|
|||
$charcode = [int] $char # => 97
|
||||
1
Task/Character-codes/PowerShell/character-codes-4.ps1
Normal file
1
Task/Character-codes/PowerShell/character-codes-4.ps1
Normal file
|
|
@ -0,0 +1 @@
|
|||
[int] [char] '☺' # => 9786
|
||||
2
Task/Character-codes/PowerShell/character-codes-5.ps1
Normal file
2
Task/Character-codes/PowerShell/character-codes-5.ps1
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
[char] 97 # a
|
||||
[char] 9786 # ☺
|
||||
7
Task/Character-codes/Rebol/character-codes.rebol
Normal file
7
Task/Character-codes/Rebol/character-codes.rebol
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
print to integer! first "a" ;; == 97
|
||||
print to integer! #"a" ;; == 97
|
||||
print to binary! "a" ;; == #{61}
|
||||
print to char! 97 ;; == a
|
||||
print to char! 0#61 ;; == a ;; available only in Rebol3
|
||||
print #"^(61)" ;; == a
|
||||
print to-hex #"a" ;; == 61 ;; since Rebol 3.20.0
|
||||
2
Task/Character-codes/Uiua/character-codes.uiua
Normal file
2
Task/Character-codes/Uiua/character-codes.uiua
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
-@\0@a
|
||||
+@\097
|
||||
5
Task/Character-codes/VBScript/character-codes.vbs
Normal file
5
Task/Character-codes/VBScript/character-codes.vbs
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