Re: sprintf() query
- Posted by _tom (admin) Oct 26, 2017
- 1154 views
petelomax said...
It seems like you are describing object orientation.
That was accidental! I am just trying to describe what I see happening right now.
? procedure
What I just tested on Phix:
object x = 1234 ? x --> 1234 puts(1, x ) --> "the pi character" --( virtual win7) string str = "hello" ? str -- "hello"
Looks like the string data-type is tagged as a text; as a result ? produces text. But for other data-types (atom,sequence) it produces numbers.
There is automagic here based on the data-type.
petes pretty printing
the pp procedure "looks" at values and adapts to show text or numbers.
(pp is a wonderful invention that must be added to OE)
Euphoria output
print and puts, user selects the nature of the output
our traditional thinking
"write"
just exploring the possibility of extending the properies of '?' that exist right now
_tom