And neither does go.
fmt.Print(x)
prints x, using its default format, which is not coincidentally available
in Printf as %v.
-rob
On Sat, Aug 5, 2023 at 7:17 AM Douglas McIlroy <
douglas.mcilroy(a)dartmouth.edu> wrote:
Most of the
time I'd rather not have to care whether the thing
I'm printing is a string, or a pointer, or an integer, or whatever:
I just want to see its value.
Go has %v for exactly this. It's very nice
for debugging.
Why so verbose? In Basic, PRINT required no formatting directives at all.
Doug