Another one:
'ported from my old sdlgraph example
IMPORT egslengine
MAIN
openwindow (640,480,0,"S T A R S")
setframetimer (60)
backcolour (0,0,0)
DIM x [0 TO 500] AS integer
DIM y [0 TO 500] AS integer
DIM z [0 TO 500] AS integer
DIM i, key AS integer
FOR i=0 TO 500
x[i]=INT (RND*screenwidth())+1
y[i]=INT (RND*screenheight())+1
z[i]=INT (RND*8)
NEXT
REPEAT
clearscreen
FOR i=0 TO 500
x[i]=x[i]-z[i]
IF x[i]<0 THEN
x[i]=x[i]+screenwidth
END IF
colour (255,255,255)
fillcircle (x[i],y[i],2)
NEXT
colour (255,255,0)
drawtext (INT(screenwidth/2),INT(screenheight/2)-7,"Stars")
sync
key=getkey
UNTIL key =27
closewindow
You can DIM a variable wherever you want (I hope so: it's alpha software)
IMPORT egslengine
MAIN
openwindow (300,200,0,"2D Drawing Test EGSL")
clearscreen
colour (0,0,255)
fillcircle (100,100,50)
colour (0,255,0)
fillbox (150,20,170,40)
colour (255,0,0)
DIM k AS INTEGER
FOR k = 1 TO 20
line (10,10+k*8,200,0)
NEXT
colour (255,255,255)
drawtext (10,50,"Hello, this is a test")
redraw
inkey
closewindow