Keywords
Oxygene, being Pascal-based, is a rich and expressive language that heavily relies on keywords over obscure syntaxes to express itself. In Oxygene, the following words are treated as keywords and have special meaning:
abstract
— Virtuality Member Modifier and Abstract Classesadd
— Events Add Statementsand
— Boolean and Bitwise Operator, Member Visibility Levels, Combined Interfacesarray
— Array Typesas
– Type Cast Expressionsasc
— LINQ Expressionsaspect
— Aspect Scope Prefixassembly
— Type Visibility Levels and Member Visibility Levels, Aspect Scope Prefixasync
— Member Modifier and Async Expressionsautoreleasepool
— Auto-release Pools for Cocoaawait
— Await Expressionsbegin
— Begin/End Blocks, Methodsblock
– Blocksbreak
— All Loop Statementsby
— LINQ Expressionscase
— Case Statements and Case Expressionsclass
— Class Types, declaring static Members and Class Referencesconcat
— LINQ Expressionsconst
— Constants and Local Constant Declarationsconstructor
— Constructors and calls to themcontinue
— All Loop Statementscopy
— Member Modifier for Properties on Cocoadefault
— Member Modifier for Propertiesdelegate
– Blocks and Eventsdeprecated
— Member Modifierdesc
— LINQ Expressionsdistinct
— LINQ Expressionsdiv
— Numberic Operatordo
— For Loop Statements and Expressions, While Loops, With Statements, Locking Statements and Expressions, Using Statements, Try Block Statementsdownto
— For Loop Statements and For Loop Expressionsdynamic
— Dynamic Typeeach
— For Loop Statements and For Loop Expressionselse
— If/Then/Else Statements and Expressions, Case Statements and Expressionsempty
— Member Modifier for Methodsend
— Begin/End Blocks and terminator for various language constructsensure
— Method Post-Conditionsenum
— Enum Typesequals
— LINQ Expressions withjoin
event
— Eventsexcept
— Try Block Statementsexit
— Exit Statements and Method Resultsextension
— Extension Types and Extension Methodsexternal
— Member Modifier for Methods and Fieldsfalse
— Boolean Literalsfinal
— Virtuality Member Modifierfinalizer
— Finalizersfinally
— Try Block Statementsflags
— Enum Typesfor
— For Loop Statements and For Loop Expressionsfrom
— LINQ Expressions, For Loop Statements and For Loop Expressionsfuture
— Future Typesglobal
— Aspect Scope Prefixgroup
— LINQ Expressionshas
— Generic Constraintsif
— If/Then/Else Statements and If/Then/Else Expressionsimplementation
— Code File "Implementation" Sectionimplements
— Explicit Interface Implementationsimplies
— Implies Operatorin
— For Loop Statements and Expressions, In Expressions, Generic Contra-Varianceindex
— For Loop Statements and For Loop Expressionsinherited
— Inherited Expressionsinline
— Member Modifier, Arraysinterface
— Interface Types, Code File "Interface" Sectioninto
— LINQ Expressionsinvariants
— Invariantsis
– Type Check Expressions, Generic Constraintsiterator
— Member Modifier for Iteratorsjoin
— LINQ Expressionslazy
— Member Modifier for Propertieslifetimestrategy
— Life-Time Strategies for Islandlocked
— Member Modifierlocking
— Locking Statements and Locking Expressionsloop
— Infinite Loopsmapped
— Mapped Types and Mapped Expressionsmatching
— For and While Loop Statements, For Expressions, and With Statementsmethod
— Methods, Anonymous Methods (Closures) and Local Method Declarationsmod
— Numberic Operatormodule
— Aspect Scope Prefixnamespace
— Namespaces, Code File Structurenested
— Nested Typesnew
— Constructor Call Expressionsnil
– Nullability,nil
Literalsnot
– Boolean and Bitwise Operator, Type Check Expressions, In Expressions, Nullabilitynotify
— Member Modifier for Propertiesnullable
– Nullability,of
— Case Statements and Case Expressions, Arrays, Enums, Sets, Sequences and Tuples, Blocks and Class Referencesold
— Method Post-Conditionson
— Try Block Statements, Locking Statements and Expressions,locked
Member Modifieroperator
— Operatorsoptional
— Member Modifier for Interface membersor
— Boolean and Bitwise Operator, Member Visibility Levelsorder
— LINQ Expressionsout
— Method Parameter Modifier, Method Calls and Generic Co-Varianceoverride
— Virtuality Member Modifierparallel
— For Loop Statements and Sequence Typesparam
— Aspect Scope Prefixparams
Method Parameter Modifierpartial
— Partial Types and Member Modifier for Methodspinned
— Pinned Local Variablesprivate
Member Visibility Levels, Invariantsproperty
— Properties and Property Statementsprotected
— Member Visibility Levelspublic
— Type Visibility Levels and Member Visibility Levels, Invariantspublished
— Member Visibility Levelsqueryable
— Sequence Typesraise
— Events Raise Statementsraises
— Member Modifier for Methodsread
— Property Gettersreadonly
— Member Modifier for Fields, Properties, Local Variables and Local Propertiesrecord
— Record Typesreintroduce
— Virtuality Member Modifierremove
— Events Remove Statementsrepeat
— Repeat/Until Loopsrequire
— Method Pre-Conditionsrequired
— Required Propertiesresult
— Method Results, Aspect Scope Prefixreverse
— LINQ Expressionssealed
— Sealed Classesselect
— LINQ Expressionsselector
— Selector Expressions for Cocoaself
— Self Expressionssequence
— Sequence Typesset
— Set Typesshl
— Bitwise Operatorshr
— Bitwise Operatorskip
— LINQ Expressionssoft
— Soft Interfacesstatic
— Member Modifierstep
— For Loop Statements and For Loop Expressionsstrong
— Storage Modifiers for ARCtake
— LINQ Expressionsthen
— If/Then/Else Statements and If/Then/Else Expressionsto
— For Loop Statements and For Loop Expressions, Mapped Types,true
— Boolean Literalstry
— Try Block Statementstuple
— Type Typestype
— Type Declarations, Code File Structureunconstrained
— Unconstrained Genericsunit
— Type Visibility Levels and Member Visibility Levelsunmanaged
— Generics Constraintsunretained
— Storage Modifiers for ARCunsafe
— Member Modifieruntil
— Repeat/Until Loopsuses
— Namespacesusing
— Using Statementsvar
— Fields, Local Variable Declarations and Method Parameter Modifier and Method Callsvirtual
— Virtuality Member Modifiervolatile
— Member Modifier for Fieldsweak
— Storage Modifiers for ARCwhere
— LINQ Expressions, Generic Constraints and Try Block Statementswhile
— While Loop Statementswith
— With Statements and LINQ Expressionswrite
— Property Settersxor
— Boolean and Bitwise Operatoryield
— Iterators
Legacy Keywords
asm
— started a block of assembly code (not supported by Oxygene, but respected by the compiler for compatibility)forward
— Forward Declarations for Global Methodsfunction
— alias for method (but must have a return type)goto
— Go To Statementsprocedure
— alias for method (but must not have a return type)
Delphi Compatibility
The following keywords are only active when Delphi Language Compatibility is enabled:
cdecl
— method calling convention modifier (honored forexternal
methods only)create
— allows calling Constructors using ".Create
"destructor
— allows defining a Delphi-style "destructor Destroy
"finalize
— allows calling Finalizers using ".Finalize
"helper
— allows declaring Extensions usingclass helper for
orrecord helper for
library
— warning directive for platform-specific code (ignored)otherwise
— alias forelse
in FPC-compatiblecase
Statementsoverload
— member modifier, ignored (Oxygene allows overloading implicitly)packed
— modifier for Records, ignoredpascal
— method calling convention modifier (ignored/the default)platform
— warning directive for platform-specific code (ignored)reference to
— marks a function pointer as Block (ignored)register
— method calling convention modifier (ignored, but not supported)safecall
— method calling convention modifier (ignored, but not supported)stdcall
— method calling convention modifier (honored forexternal
methods only)strict
— declares a static methods w/o access to the class metadata (ignored)