Introduction

This is a collection of short code examples demonstrating new features of the Ada 2022 Standard as they are implemented in GNAT Ada compiler.

To use some of these features, you may need to use a compiler command line switch or pragma. Compilers starting with GNAT Community Edition 2021 or GCC 11 use pragma Ada_2022; or the -gnat2022 switch. Older compilers use pragma Ada_2020; or -gnat2020. To use the square brackets syntax or 'Reduce expressions, you need pragma Extensions_Allowed (On); or the -gnatX switch.

References