Way to implement a compound type? (enum with fallback u32) #172
Unanswered
RocketMaDev
asked this question in
Q&A
Replies: 1 comment
-
I try to write like:
But |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Sometimes a int field have some sorts of special constants, and I would like to bind them to enums, while the rest numbers keep the normal form. For example, type
SECT
takes a u32 value, and a special value0xffffffff
means "END", how to control its display, so that when a field is not(u32)-1
, display0xffffffff
, and when it's(u32)-1
, display asEND
?Beta Was this translation helpful? Give feedback.
All reactions