From 82ba818ff456bcd6d56a06226e3f27e98fbb55c3 Mon Sep 17 00:00:00 2001 From: Craig Jennings Date: Thu, 14 Aug 2025 22:58:58 -0500 Subject: removing all downloaded devdocs files --- devdocs/gcc~13/using-fast-enumeration.html | 18 ------------------ 1 file changed, 18 deletions(-) delete mode 100644 devdocs/gcc~13/using-fast-enumeration.html (limited to 'devdocs/gcc~13/using-fast-enumeration.html') diff --git a/devdocs/gcc~13/using-fast-enumeration.html b/devdocs/gcc~13/using-fast-enumeration.html deleted file mode 100644 index f212bd86..00000000 --- a/devdocs/gcc~13/using-fast-enumeration.html +++ /dev/null @@ -1,18 +0,0 @@ -

8.9.1 Using Fast Enumeration

GNU Objective-C provides support for the fast enumeration syntax:

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

array needs to be an Objective-C object (usually a collection object, for example an array, a dictionary or a set) which implements the “Fast Enumeration Protocol” (see below). If you are using a Foundation library such as GNUstep Base or Apple Cocoa Foundation, all collection objects in the library implement this protocol and can be used in this way.

The code above would iterate over all objects in array. For each of them, it assigns it to object, then executes the Do something with 'object' statements.

Here is a fully worked-out example using a Foundation library (which provides the implementation of NSArray, NSString and NSLog):

NSArray *array = [NSArray arrayWithObjects: @"1", @"2", @"3", nil];
-NSString *object;
-
-for (object in array)
-  NSLog (@"Iterating over %@", object);
-
-

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

-
-- cgit v1.2.3