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

6.30 Case Ranges ΒΆ

You can specify a range of consecutive values in a single case label, like this:

case low ... high:
+

This has the same effect as the proper number of individual case labels, one for each integer value from low to high, inclusive.

This feature is especially useful for ranges of ASCII character codes:

case 'A' ... 'Z':
+

Be careful: Write spaces around the ..., for otherwise it may be parsed wrong when you use it with integer values. For example, write this:

case 1 ... 5:
+

rather than this:

case 1...5:
+
+

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

+
-- cgit v1.2.3