Pages vues depuis 25/07/2007 : 24 892 755
Index du forum »» Création-Développement »» Optimisation des boucles FOR
@SCREEN?{Width?=?640,?Height?=?480}
Function?PRG()
StartTimer(1)????
????For?I=0?To?100000
????????Local?A=I
????Next
????
????Local?Temps=GetTimer(1)
????
TextOut?(0,0,Temps)
Cls
EndFunction
SetInterval(1,PRG,20)
Repeat????
WaitEvent()
Forever
@SCREEN?{Width?=?640,?Height?=?480}
Function?PRG()
StartTimer(1)????
????For?Local?I=0?To?100000
????????Local?A=I
????Next
????
????Local?Temps=GetTimer(1)
????
TextOut?(0,0,Temps)
Cls
EndFunction
SetInterval(1,PRG,20)
Repeat????
WaitEvent()
Forever