Files
harbour-core/tests/speed.prg
vszakats a4a357a18b 2013-03-15 11:12 UTC+0100 Viktor Szakats (harbour syenar.net)
* /harbour/* -> /*
    * moved whole Harbour source tree one level up to
      avoid single 'harbour' top dir
2013-03-15 11:13:30 +01:00

27 lines
579 B
Plaintext

/*
* $Id$
*/
PROCEDURE Main()
LOCAL Program := {, }, Condition := 1, body := 2, Counter := 1, TheEnd := 1000000, stop, start
Program[ condition ] := {|| Counter == TheEnd }
Program[ body ] := {|| Counter++ }
? start := Second()
// in Clipper :
// WHILE ! Program[ condition ]:Eval() ; Program[ body ]:Eval()
// why Harbour CodeBlocks don't have Eval() method ?!
// Now It is supported.
DO WHILE ! Eval( Program[ condition ] )
Eval( Program[ body ] )
ENDDO
? stop := Second()
? "==============="
? stop - start
RETURN