4 ms·
The vector type is always given as an example, but I find the ability to give a type to printf more mind bending. Just in case that went over your head and to
by DanWaterworth 14y ago
The vector type is always given as an example, but I find the ability to give a type to printf more mind bending.
Just in case that went over your head and to reiterate, that means that:
printf "Hello %s" 4
would generate a type error, so would:
printf "Hello %s" "wor" "ld!"
and:
printf "Hello %s! %s" "world"
but:
printf "%s %s!" "Hello" "world"
wouldn't.