home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 2 / Apprentice-Release2.iso / Tools / Languages / MacOberonLite 1.0.1 / Samples / HelloWorld.Mod next >
Encoding:
Text File  |  1994-04-09  |  666 b   |  34 lines  |  [TEXT/ObLi]

  1. MODULE HelloWorld;
  2.  
  3. IMPORT
  4.     SYSTEM, TB:= MacToolbox,ME:=MacMemory,TE:=MacText,IM:=MacImaging;
  5.  
  6. VAR
  7.     window : TB.WindowPtr;
  8.     wRect  : IM.Rect;
  9.     string : ME.Str255;
  10.  
  11. BEGIN
  12.     IM.InitGraf(IM.QuickDraw.thePort);
  13.     TE.InitFonts;
  14.           TB.InitWindows;
  15.           TB.InitMenus;
  16.           TE.TEInit;
  17.           TB.InitDialogs(NIL);
  18.           IM.InitCursor;
  19.  
  20.     IM.SetRect(wRect, 50, 50, 400, 200);
  21.     window:=TB.NewWindow(NIL, wRect, '', TRUE, 0, SYSTEM.VAL(TB.WindowPtr,-1), FALSE, 0);
  22.  
  23.     IM.SetPort(window);
  24.     IM.MoveTo(30,30);
  25.     TB.SetStr255(string, 'Hello World');
  26.     TE.DrawString(string);
  27.  
  28.     REPEAT
  29.     UNTIL TB.Button();
  30.  
  31.     TB.DisposeWindow(window);
  32.  
  33. END HelloWorld.
  34.