Is (keyword)
From RemObjects Software
This keyword is used in two contexts:
Type checking
if <object> is <type> then … if <object> is not <type> then …
Generic constraints
is is used within a where clause:
type MyArrayList<T> = public class(ArrayList, IPersistentCollection) where T is PersistentObject, T has constructor;
As well as allowing you to check for a particular type, Oxygene generics also supports 'is record' and 'is class':
type GenericThatOnlyTakesARecord<T> = class where T is record; FVal: T; public constructor (Val: T); end; GenericThatOnlyTakesAClass<T> = class where T is class; FVal: T; public constructor (Val: T); end;
'is class' means that it's not a value type/record (even though value types descend from System.Object).
See Also
Product: RemObjects Oxygene (formerly known as Chrome)
Current version: 3.0
Previous Versions: 'Joyride' (2.0), 'Floorshow' (1.5), 'Adrenochrome' (1.0)
Glossary — Keywords — Language Features — Platform Features — Samples — Articles — How To — Issues
Categories: Text | Oxygene | Language | Keyword
