objeck / objeck-lang

Objeck is a modern object-oriented programming language with functional features tailored for machine learning. It emphasizes expression, simplicity, portability, and scalability. The programming environment consists of a compiler, virtual machine, REPL shell, and command line debugger with IDE plugins.
https://objeck.org
Other
154 stars 11 forks source link

Data Type Formatting Options #479

Closed objeck closed 6 months ago

objeck commented 6 months ago
          We are misunderstanding each other. I'm asking for a way to format the output, similar to C's `printf`. The magic is really the `"%02x "` format specifier of `printf`. Objeck has nothing equivalent. Yes, I know the `ffffffffffffff` and the `00000000000000` are always there, but I should be able to format the output to not show them.

Originally posted by @iahung2 in https://github.com/objeck/objeck-lang/issues/472#issuecomment-1964700156

objeck commented 6 months ago

I am considering adding ToStringUnsigned() to the Char and Byte classes.

ghost commented 6 months ago

I am considering adding ToStringUnsigned() to the Char and Byte classes.

No, please don't. You should better invest in System.IO.Standard->SetIntFormat and extend System.Number->Format. Please remove the useless ToHexString method you just added, too. It gives exactly the same output as ToString!

objeck commented 6 months ago

See #472