Data update

This commit is contained in:
Ingy döt Net 2026-04-30 12:34:36 -04:00
parent 4bb20c9b71
commit cbaf4c4b64
12390 changed files with 318560 additions and 27248 deletions

View 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;

View 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)

View file

@ -0,0 +1,4 @@
(import std.String)
(print (string:ord "a"))
(print (string:chr 97))

View 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.

View file

@ -0,0 +1,2 @@
(string-to-char "a") ;=> 97
(format "%c" 97) ;=> "a"

View file

@ -0,0 +1,2 @@
printf(1,"%d\n", 'a') -- prints "97"
printf(1,"%s\n", 97) -- prints "a"

View file

@ -0,0 +1,7 @@
class Main {
static public function main():Void {
trace("a".code);
trace("".code);
trace("🍆".code);
}
}

View 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)
}

View file

@ -0,0 +1 @@
$char = [convert]::toChar(0x2f) #=> /

View file

@ -0,0 +1 @@
$char = [char] 'a'

View file

@ -0,0 +1 @@
$charcode = [int] $char # => 97

View file

@ -0,0 +1 @@
[int] [char] '☺' # => 9786

View file

@ -0,0 +1,2 @@
[char] 97 # a
[char] 9786 # ☺

View 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

View file

@ -0,0 +1,2 @@
-@\0@a
+@\097

View file

@ -0,0 +1,5 @@
'prints a
WScript.StdOut.WriteLine Chr(97)
'prints 97
WScript.StdOut.WriteLine Asc("a")