On 04.11.2019 09:58, Sven Schreiber wrote:
matrix m
strings s2 = defarray("A","B")
string sf = toupper(flatten(s2))
string s = strsub(sf, "A", "10")
s = strsub(s, "B", "11")
s = strsub(s, "C", "12")
s = strsub(s, "D", "13")
s = strsub(s, "E", "14")
s = strsub(s, "F", "15")
sscanf(s, "%m", m)
print m
Hi Sven,
I solved it in the following form:
<hansl>
strings s2 = defarray("A","B")
scalar iter = nelem(s2)
matrix m = zeros(iter)
loop i=1..iter --quiet
sscanf(s2[i], "%x", m[i])
endloop
print m
</hansl>
Cheers,
Marcin
--
Marcin Błażejowski