source: CIVL/mods/dev.civl.abc/examples/compound2.c

main
Last change on this file was aad342c, checked in by Stephen Siegel <siegel@…>, 3 years ago

Performing huge refactor to incorporate ABC, GMC, and SARL into CIVL repo and use Java modules.

git-svn-id: svn://vsl.cis.udel.edu/civl/trunk@5664 fb995dde-84ed-4084-dfe6-e5aef3e2452c

  • Property mode set to 100644
File size: 215 bytes
RevLine 
[aad342c]1// a is initialized using a compound literal to define
2// a literal array. The array is converted to pointer to int.
3void main() {
4 int *a = (int[]){ [2] = 3 };
5
6 // int *b = { [2] = 3 }; // wrong
7 a[1]=1;
8}
Note: See TracBrowser for help on using the repository browser.