fesch / Structorizer.Desktop

Structorizer is a little tool which you can use to create Nassi-Schneiderman Diagrams (NSD).
https://structorizer.fisch.lu
GNU General Public License v3.0
65 stars 20 forks source link

On exporting record initializers to C or C++, an equivalent C 99 notation might be used. #1090

Open codemanyak opened 1 year ago

codemanyak commented 1 year ago

By now (i.e. upto version 3.32-11 at least) a record initializer expression like the one in the cyan element of diagram DateTests563 in the below arrangement would be exported to C as an ordered value initializer expression: Record_initializer_3 28-06 This means, the resulting program line in the C code would be:

struct Date someDay = {2017, 2, 24};

The resulting code is quite correct, of course. But instead a closer C syntax could be used for the export:

struct Date someDay = {.day = 24, .month = 2, .year = 2017};