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,9 @@
with Ada.Integer_Text_IO; use Ada.Integer_Text_IO;
procedure Test_Literals is
begin
Put (16#2D7#);
Put (10#727#);
Put (8#1_327#);
Put (2#10_1101_0111#);
end Test_Literals;

View file

@ -0,0 +1,2 @@
display B#10 ", " O#01234567 ", " -0123456789 ", "
H#0123456789ABCDEF ", " X#0123456789ABCDEF ", " 1;2;3;4

View file

@ -0,0 +1,2 @@
if 1234 = 1,2,3,4 then display "Decimal point is not comma" end-if
if 1234 = 1;2;3;4 then display "literals are equal, semi-colons ignored" end-if

View file

@ -1,16 +1,16 @@
^|
| EMal internally uses 64 bit signed integers.
|^
int hex = 0xff # base16
int oct = 0o377 # base8
int bin = 0b11111111 # base2
int dec = 255 # base10
int hex 0xff # base16
int oct 0o377 # base8
int bin 0b11111111 # base2
int dec 255 # base10
writeLine(hex)
writeLine(oct)
writeLine(bin)
writeLine(dec)
# here we check that they give the same value
writeLine(0b1011010111 == 0o1327 and
0o1327 == 0x2d7 and
0x2d7 == 727 and
727 == 0b1011010111)
writeLine(0b1011010111 æ 0o1327 and
0o1327 æ 0x2d7 and
0x2d7 æ 727 and
727 æ 0b1011010111)

View file

@ -0,0 +1,5 @@
123 ;; decimal all Emacs
#b101 ;; binary Emacs 21 up, XEmacs 21
#o77 ;; octal Emacs 21 up, XEmacs 21
#xFF ;; hex Emacs 21 up, XEmacs 21
#3r210 ;; any radix 2-36 Emacs 21 up (but not XEmacs 21.4)

View file

@ -0,0 +1,6 @@
printf(1,"Decimal:\t%d, %d, %d, %d\n",{-10,10,16,64})
printf(1,"Hex:\t%x, %x, %x, %x\n",{-10,10,16,64})
printf(1,"Octal:\t%o, %o, %o, %o\n",{-10,10,16,64})
printf(1,"Exponential:\t%e, %e, %e, %e\n",{-10,10,16,64.12})
printf(1,"Floating Point\t%3.3f, %3.3f, %+3.3f\n",{-10,10.2,16.25,64.12625})
printf(1,"Floating Point or Exponential: %g, %g, %g, %g\n",{10,16,64,123456789.123})

View file

@ -0,0 +1,2 @@
727 # base 10
0x2d7 # base 16

View file

@ -0,0 +1,4 @@
3KB # 3072
3MB # 3145728
3GB # 3221225472
3TB # 3298534883328

View file

@ -0,0 +1,2 @@
1
1'000

View file

@ -0,0 +1,8 @@
2#11
;== 3
8#644
;== 420
0#FF
;== 255
16#FF
;== 255