mirror of
https://salsa.debian.org/dskoll/remind.git
synced 2026-04-17 14:59:20 +02:00
Support hexadecimal integer constants in expressions; add hex() function.
This commit is contained in:
@@ -813,6 +813,17 @@ REM MSG fib(30) = [fib(30)]
|
||||
|
||||
EOF
|
||||
|
||||
# Test hex constants
|
||||
../src/remind -dh --flush -q - 2025-01-01 <<'EOF' >> ../tests/test.out 2>&1
|
||||
BANNER %
|
||||
SET $AddBlankLines 0
|
||||
set a 0xfe + 0xef
|
||||
rem msg a = [a]; hex(a) = [hex(a)]
|
||||
rem msg hex(-1) = [hex(-1)]
|
||||
set a 0x7fff
|
||||
rem msg a = [a]; hex(a) = [hex(a)]
|
||||
EOF
|
||||
|
||||
cmp -s ../tests/test.out ../tests/test.cmp
|
||||
if [ "$?" = "0" ]; then
|
||||
echo "Remind: Acceptance test PASSED"
|
||||
|
||||
@@ -24635,6 +24635,7 @@ hebdate
|
||||
hebday
|
||||
hebmon
|
||||
hebyear
|
||||
hex
|
||||
hour
|
||||
htmlescape
|
||||
htmlstriptags
|
||||
@@ -39862,3 +39863,28 @@ Expression nodes high-water: 16
|
||||
Parse level high-water: 25
|
||||
Max expr node evaluations per line: 1000000
|
||||
Total expression node evaluations: 3999940
|
||||
a = 493; hex(a) = 1ED
|
||||
hex(-1) = FFFFFFFF
|
||||
a = 32767; hex(a) = 7FFF
|
||||
Variable hash table statistics:
|
||||
Entries: 1; Buckets: 7; Non-empty Buckets: 1
|
||||
Maxlen: 1; Minlen: 0; Avglen: 0.143; Stddev: 0.350; Avg nonempty len: 1.000
|
||||
Growths: 0; Shrinks: 0
|
||||
Function hash table statistics:
|
||||
Entries: 0; Buckets: 7; Non-empty Buckets: 0
|
||||
Maxlen: 0; Minlen: 0; Avglen: 0.000; Stddev: 0.000; Avg nonempty len: 0.000
|
||||
Growths: 0; Shrinks: 0
|
||||
Dedupe hash table statistics:
|
||||
Entries: 0; Buckets: 7; Non-empty Buckets: 0
|
||||
Maxlen: 0; Minlen: 0; Avglen: 0.000; Stddev: 0.000; Avg nonempty len: 0.000
|
||||
Growths: 0; Shrinks: 0
|
||||
Translation hash table statistics:
|
||||
Entries: 1; Buckets: 7; Non-empty Buckets: 1
|
||||
Maxlen: 1; Minlen: 0; Avglen: 0.143; Stddev: 0.350; Avg nonempty len: 1.000
|
||||
Growths: 0; Shrinks: 0
|
||||
Expression nodes allocated: 256
|
||||
Expression nodes high-water: 3
|
||||
Expression nodes leaked: 0
|
||||
Parse level high-water: 17
|
||||
Max expr node evaluations per line: 3
|
||||
Total expression node evaluations: 13
|
||||
|
||||
Reference in New Issue
Block a user