Extended Constructor Calls
From RemObjects Software
This is a Oxygene Language Feature topic
Feel free to add your notes to this topic below.
Very often the first thing to be done after creating a class is to initialize some of its fields and properties.
For example:
with p := new Point(param1, param1) do begin p.x := 10; p.y := 20; // other code end;
Oxygene allows you to add named parameters after the normal constructor parameters. These are in the form name := value thus allowing the code above to be replaced by:
with p := new Point(param1, param1, x := 10, y := 20) do begin // code end;
This extended syntax is only supported for constructor and the named parameters can only be placed after the normal parameters.
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 | Feature
