Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight
 
PerlMonks  

Re^2: Looking for ideas: Converting a binary 'flags' field into something human readable

by locked_user sundialsvc4 (Abbot)
on Jul 09, 2015 at 00:47 UTC ( [id://1133847]=note: print w/replies, xml ) Need Help??


in reply to Re: Looking for ideas: Converting a binary 'flags' field into something human readable
in thread Looking for ideas: Converting a binary 'flags' field into something human readable

That seems to me to be a “at least fairly genius” suggestion:   to encode the value as the bit-field which it is, but then to document the meaning of the field to the human reader.   (The computer wouldn’t care.)

Promptly upvoted.

The parser-grammar could fairly easily be made to include a descriptor that, one way or another, maps to a (hard-coded) Perl subroutine within the parser ... which generates the comment-entries to describe the field.   (Personally, I think I’d do it as a table, including the starting byte/bit number, the number of bits, and the interpretation.   “ASCII Art” could be unmanageable.)

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1133847]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others learning in the Monastery: (2)
As of 2026-02-14 00:31 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?
    hippoepoptai's answer Re: how do I set a cookie and redirect was blessed by hippo!
    erzuuliAnonymous Monks are no longer allowed to use Super Search, due to an excessive use of this resource by robots.