Original date:2015-02-13 08:52:21 Edited by: Ekhnat0n Subject: Re: POLL: What should value do with underscores?

Should the following be equivalent?

value("1024") ,
value("0b100_00000000"), 1024 in binary BTW
value("#400"), 1024 in hex
value("0t2000") 1024 in octal

Currently, value does not regard '_' as a possible part of a number and parses decimal,
hexadecimal and scientific notation but neither octal nor binary.

Just use these standards: for nat: value(1[.]024) No decimal comma (as natural numbers cannot be broken)

for dec: value(1[.]024,0) Obligatory decimal comma
for hex: value(#[0]400)
for oct: value(*2000)
for bin: value(&[000000]1000000000)

For the sake of programming however 3 options will suffice: nat/dec and hex AND maybe
for sci: value(%1.024e3)

Not Categorized, Please Help


Quick Links

User menu

Not signed in.

Misc Menu