From 754bbf7a25a8dda49b5d08ef0d0443bbf5af0e36 Mon Sep 17 00:00:00 2001 From: Craig Jennings Date: Sun, 7 Apr 2024 13:41:34 -0500 Subject: new repository --- .../gcc~13/c99-like-fast-enumeration-syntax.html | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 devdocs/gcc~13/c99-like-fast-enumeration-syntax.html (limited to 'devdocs/gcc~13/c99-like-fast-enumeration-syntax.html') diff --git a/devdocs/gcc~13/c99-like-fast-enumeration-syntax.html b/devdocs/gcc~13/c99-like-fast-enumeration-syntax.html new file mode 100644 index 00000000..3bae2368 --- /dev/null +++ b/devdocs/gcc~13/c99-like-fast-enumeration-syntax.html @@ -0,0 +1,21 @@ +

8.9.2 C99-Like Fast Enumeration Syntax

A c99-like declaration syntax is also allowed:

id array = …;
+
+for (id object in array)
+{
+  /* Do something with 'object'  */
+}
+

this is completely equivalent to:

id array = …;
+
+{
+  id object;
+  for (object in array)
+  {
+    /* Do something with 'object'  */
+  }
+}
+

but can save some typing.

Note that the option -std=c99 is not required to allow this syntax in Objective-C.

+

+ © Free Software Foundation
Licensed under the GNU Free Documentation License, Version 1.3.
+ https://gcc.gnu.org/onlinedocs/gcc-13.1.0/gcc/c99-like-fast-enumeration-syntax.html +

+
-- cgit v1.2.3