On Sat, 21 Sep 2019 10:03:26 -0600, Jack J. Woehr wrote: >On 9/21/19 9:56 AM, Jon Perryman wrote: >> It's interesting to see an actual use case for C union and bit mapping. >> In all these years, I've never seen these used in programs I've worked with >> because of portability issues and not really providing useful functionality >> for those products. > >An archaism of C that remains because old *nix programs use or used them. > >Legacy of the era of expensive RAM. > And for mapping variant record types. Would SMF data be a good example?
But C leaves the programmer inundated with sometimes needless identifiers: One for the union; one for each variant (is the former optional nowadays?) Pascal is friendlier: leaf fields in any variant may be referenced as fields of the root if unique, and neither the union nor the variants need be named. Very similar to the requirements of Assembler. -- gil ---------------------------------------------------------------------- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN