POLL: What should value do with underscores?

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

The interpreter can read things like "2e10_000" and "#DEAD_BEEF". It can read values as hexadecimal, decimal, octal, and even binary. Okay, now although the interpreter might be able to handle special formatting of numbers, that does not necessarily mean that an application written in EUPHORIA should handle '_' this way or handle specially strings like "0b0" at the beginning of the number when it uses value() or get().

So, my question is to you all is, should any literal that is readable by the interpreter be readable by the routines value() and get() the same way?

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.

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

Search



Quick Links

User menu

Not signed in.

Misc Menu