As an aside I just noticed that hex constants are not currently permitted in 3.14 when the field being initialized is UCHAR, USHORT or ULONG; the first two are converted using sscanf("%u"), the latter using strtoul() with base=10. That seems exactly the wrong way round to me, but anyway...
As an aside I just noticed that hex constants are not currently permitted in 3.14 when the field being initialized is UCHAR, USHORT or ULONG; the first two are converted using sscanf("%u"), the latter using strtoul() with base=10. That seems exactly the wrong way round to me, but anyway...
From my updated regression test database:
record(aSub, "as1") {
field(INPA, 0x10)
field(FTA, "CHAR")
field(INPB, 0x10)
field(FTB, "UCHAR")
field(INPC, 0x10)
field(FTC, "SHORT")
field(INPD, 0x10)
field(FTD, "USHORT")
field(INPE, 0x10)
field(FTE, "LONG")
field(INPF, 0x10)
field(FTF, "ULONG")
field(INPG, 0x10)
field(FTG, "FLOAT")
field(INPH, 0x10)
field(FTH, "DOUBLE")
}
On 3.14.12.6 this gives:
tux% caget as1.A as1.B as1.C as1.D as1.E as1.F as1.G as1.H
as1.A 16
as1.B 0
as1.C 16
as1.D 0
as1.E 16
as1.F 0
as1.G 16
as1.H 16