Codez plus proprement grâce à l’opérateur ternaire de Delphi

Septembre 16, 2025
Delphi 13 Florence introduit plusieurs améliorations du langage Delphi, y compris un opérateur ternaire concis pour les expressions conditionnelles en ligne.

Continuer de lire en anglais:

Delphi by Embarcadero is an advanced Integrated Development Environment (IDE) that allows you to build native applications for desktop, mobile, web, and console environments using a single codebase. It includes a visual designer, code editor, debugger, and component library, all specifically designed for rapid application development with the Object Pascal programming language. With Delphi, you can target Windows, macOS, iOS, Android, and Linux while leveraging a large developer community and extensive third-party plugin support.

With the Delphi 13 Florence release, developers can now express conditional logic more cleanly with the introduction of a ternary operator. Implemented using the familiar 'if' keyword, this new syntax mirrors similar constructs in other languages, allowing conditions to be evaluated directly within expressions. This change improves code readability and reduces verbosity, especially in scenarios where simple value selection depends on a condition. Alongside this, RAD Studio 13.0 includes additional Delphi language refinements aimed at modernizing and simplifying code development.

To see a full list of what's new in version 13 Florence, see our release notes.

Delphi is licensed per Named, Network Named or Concurrent user and is available as a Perpetual License with an Update Subscription that includes support and free upgrades for 1 Year. See our Delphi licensing page for full details.

Delphi is available to buy in the following products: