On 06.11.2019 22:58, Allin Cottrell wrote:
On Sun, 3 Nov 2019, Marcin Błażejowski wrote:
> is it possible to use "%x" formatter in conjunction with "%m" in
sscanf
> (i.e. perform hex-to-int conversion of array of strings into a matrix)?
You can't combine "%x" and "%m" as such. But let's try
scanning:
<hansl>
strings S = defarray("0x01", "0xff", "0xea",
"0x22")
matrix m = {}
sscanf(S, "%m", m)
print m
</hansl>
Output:
? print m
m (4 x 1)
1
255
234
34
So it "just works" without requiring "%x", so long as the hex
strings
are identified as such via the "0x" prefix.
Allin, thanx!!!
--
Marcin Błażejowski