Re: POLL: What should value do with underscores?

new topic     » goto parent     » topic index » view thread      » older message » newer message

quoting:
Should the following be equivalent?

value("1024") ,
value("1_024"),
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)

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu