Object Pascal: Difference between revisions

Content deleted Content added
m Reverted 1 edit by SoftwareDeveloper to last revision by Aleagle. using TW
Apple's Object Pascal: improved formatting
Line 41:
==Hello world example ==
===Apple's Object Pascal===
'''program''' ObjectPascalExample;<br/>
'''type'''
'''type'''
THelloWorld = '''object'''
'''procedure''' Put;
'''end''';<br/>
'''typevar'''
HelloWorld: THelloWorld;<br/>
'''procedure''' THelloWorld.Put;
'''begin'''
WriteLn('Hello, World!');
'''end''';<br/>
'''var'''
'''begin'''
HelloWorld: THelloWorld;<br/>
'''procedure''' THelloWorld.Put;
'''begin'''
WriteLn('Hello, World!');
'''end''';<br/>
'''begin'''
New(HelloWorld);
HelloWorld.Put;
Dispose(HelloWorld);
'''end'''.
 
===Turbo Pascal's Object Pascal===