Entry Point

From The Oxygene Language Wiki

Jump to:navigation, search

This is a Language topic
Feel free to add your notes to this topic below.


Normally, program execution starts with the Main Method, but from Apr10 onwards an Entry Point may be provided.

This allows one source module in an .exe project to have a classic "Turbo Pascal/Delphi" style entry point block of code, with a "begin/end." pair, as shown below.

In addition, interface/implementation will be optional, but only when there is a begin/end right after the namespace and/or uses.


namespace MyProject;
 
begin
  Console.WriteLine('Hello There!');
end.

namespace MyProject;

interface

// ...

implementation

//...

begin 
  // Entry Point
end.


Note: The begin/end block is unique by not being within a class member.


See Also


Oxygene-48.png

Area: Oxygene Language
Compiler version: Oxygene 5

Language GlossaryKeywordsTypesFAQHow To

Navigation
Areas
More
Toolbox