August 23, 2021 5:08 PM, "Raul Miller" wrote:
> You might try
> require'general/misc/format format/printf'
> a=:i.2 2 [ b=:6
> 'v1: %d\nv2: %s\nv3: %d\n' printf b;(flatten a);b
Thanks, I did not know 'flatten' before.
Ruda
--
F
You might try
require'general/misc/format format/printf'
a=:i.2 2 [ b=:6
'v1: %d\nv2: %s\nv3: %d\n' printf b;(flatten a);b
Note also that if you are re-using a format string many times, you can
save some overhead by "pre-compiling" the format string and reusing
that result, along these li
Raul Miller writes:
> The problem here is that you told printf that you were giving it a
> list of characters but did not do so.
Thanks.
Is then this the right way to print such a combination:
b=: 6
a=: i. 2 2
'%d%s%d' printf b; (,((":a),"1 LF)) ; b
or can the middle part be made simpler?
The problem here is that you told printf that you were giving it a
list of characters but did not do so.
printf
printf_jprintf_
printf_jprintf_
display@sprintf
a=:1+i.2 2
b=:6
'x%dx%sx%dx' sprintf b; (":a) ; b
x
6
x
1 2
3 4
x
6
x
$'x%dx%sx%dx' sprintf b; (":a) ; b
9 3
<"1 'x%d
Dear list,
I have been surprised by this:
---
]a=: _2 ]\ 1 2 3 4
1 2
3 4
b=: 6
'x%d%d' printf b; b
x66
'x%d%s%d' printf b; (":a) ; b
x
6
1 2
3 4
6
---
I do not understand who adds the newlines in the last case. I'd expect
something like
x61 2
3 46
especially when
'x%d%s%d' pri