http://www.perlmonks.org?node_id=1031098


in reply to Re: Convert Non-standard C struct data to standard C struct
in thread Change the data to have the format which is like a C struct.

That doesn't look like any "standard C" I've ever seen?

Yeah, I agree. I haven't written C code for the last five or six years, but, to me, a standard C struct declaration usually looks more like this:

struct date { int day; int month; int year; } struct my_record_type { long key; int size; char text[128]; struct date birthdate; }

Replies are listed 'Best First'.
Re^3: Convert Non-standard C struct data to standard C struct
by BrowserUk (Patriarch) on Apr 28, 2013 at 17:04 UTC

    Yup! Pre-ANSI C allowed untyped vars to default to ints, but that did not extend to struct members; you cannot initialise struct members individually; and you don't assign the curlies to the tagname


    With the rise and rise of 'Social' network sites: 'Computers are making people easier to use everyday'
    Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
    "Science is about questioning the status quo. Questioning authority".
    In the absence of evidence, opinion is indistinguishable from prejudice.

      Yes, and I also chose my example in a way to show how to declare nested structures, which is quite different from the OP's example.