برمجة Pascal برمجة توازي لغة C وتفوقها سهولة، وهذا مثال :
كود:
Program main;
var
{declaration area - This is a remark in Pascal and all these are variables}
x: integer;
y: longInt;
window: WindowPtr;
origPort: GrafPtr;
myStr: Str255;
begin { the is the begining of the program }
{ Init Macintosh Toolbox managers }
InitGraf(@thePort);
InitWindows;
InitFonts;
InitMenus;
TEInit;
InitDialogs(nil);
myStr := 'This is Pascal!';
window := GetNewCWindow (128, nil, WindowPtr(-1));
ShowWindow (window);
SetPort(window);
MoveTo (100,100);
DrawString (myStr);
end.
أتمنى أن يكون المثال مفيدا..وهناك المزيد منه إن شاء الله..