home *** CD-ROM | disk | FTP | other *** search
/ Amiga MA Magazine 1998 #6 / amigamamagazinepolishissue1998.iso / coders / jËzyki_programowania / amigae / e_v3.2a / src / guide / screens.e < prev    next >
Text File  |  1977-12-31  |  826b  |  29 lines

  1. MODULE 'intuition/intuition', 'graphics/view'
  2.  
  3. PROC main()
  4.   DEF sptr=NIL, wptr=NIL, i
  5.   sptr:=OpenS(640,200,4,V_HIRES,'Screen demo')
  6.   IF sptr
  7.     wptr:=OpenW(0,20,640,180,IDCMP_CLOSEWINDOW,
  8.                 WFLG_CLOSEGADGET OR WFLG_ACTIVATE,
  9.                 'Graphics demo window',sptr,$F,NIL)
  10.     IF wptr
  11.       TextF(20,20,'Hello World')
  12.       FOR i:=0 TO 15  /* Draw a line and box in each colour */
  13.         Line(20,30,620,30+(7*i),i)
  14.         Box(10+(40*i),140,30+(40*i),170,1)
  15.         Box(11+(40*i),141,29+(40*i),169,i)
  16.       ENDFOR
  17.       WHILE WaitIMessage(wptr)<>IDCMP_CLOSEWINDOW
  18.       ENDWHILE
  19.       WriteF('Program finished successfully\n')
  20.     ELSE
  21.       WriteF('Could not open window\n')
  22.     ENDIF
  23.   ELSE
  24.     WriteF('Could not open screen\n')
  25.   ENDIF
  26.   IF wptr THEN CloseW(wptr)
  27.   IF sptr THEN CloseS(sptr)
  28. ENDPROC
  29.