getting close !!

Przemyslaw Czerpak escribió:
On Mon, 16 Mar 2009, Angel Pais wrote:
Still some errors left...

Thank you for test.
Now it's much better but new PP rules are still not executed like
in Clipper.
I'm attaching 3-rd version and against asking for tests.

best regards,
Przemek


#line 1 "\ALASKA\XPPW32\INCLUDE\STD.CH"@"STD.CH" 
#line 1 "\ALASKA\XPPW32\INCLUDE\Set.ch"@"Set.ch" 
#line 1 "\ALASKA\XPPW32\INCLUDE\natmsg.ch"@"natmsg.ch" 
#line 18 "\ALASKA\XPPW32\INCLUDE\Set.ch" 
#line 37 "\ALASKA\XPPW32\INCLUDE\STD.CH" 
#line 1 "\ALASKA\XPPW32\INCLUDE\Get.ch"@"Get.ch" 
#line 42 "\ALASKA\XPPW32\INCLUDE\STD.CH" 
#line 1 "\ALASKA\XPPW32\INCLUDE\Prompt.ch"@"Prompt.ch" 
#line 47 "\ALASKA\XPPW32\INCLUDE\STD.CH" 
#line 1 "\ALASKA\XPPW32\INCLUDE\Memvar.ch"@"Memvar.ch" 
#line 53 "\ALASKA\XPPW32\INCLUDE\STD.CH" 
#line 1 "\ALASKA\XPPW32\INCLUDE\collat.ch"@"collat.ch" 
#line 58 "\ALASKA\XPPW32\INCLUDE\STD.CH" 
#line 1 "SPEEDTST3.PRG" 
#line 1 "\ALASKA\XPPW32\INCLUDE\common.ch"@"common.ch" 
#line 77 "SPEEDTST3.PRG" 














































proc main( _p01, _p02, _p03, _p04, _p05, _p06, _p07, _p08, _p09, _p10,  _p11, 
_p12, _p13, _p14, _p15, _p16, _p17, _p18, _p19, _p20 )



   local aParams :=  asize( { _p01, _p02, _p03, _p04, _p05, _p06, _p07, _p08, 
_p09, _p10,  _p11, _p12, _p13, _p14, _p15, _p16, _p17, _p18, _p19, _p20 },  
min( pCount(), 20 ) )

   local nMT, cExclude, lScale, cParam, cMemTests, lSyntax, i, j

   lSyntax := lScale := .f.
   cMemTests := "029 030 023 025 027 040 041 043 052 053 019 022 031 032 054 
055 "
   cExclude := ""
   nMT := 0
   for j := 1 to len( aParams )
      cParam := lower( aParams[ j ] )
      if cParam = "--thread"
         if substr( cParam, 9, 1 ) == "="
            if isdigit( substr( cParam, 10, 1 ) )
               nMT := val( substr( cParam, 10 ) )
            elseif substr( cParam, 10 ) == "all"
               nMT := -1
            else
               lSyntax = .t.
            endif
         elseif empty( substr( cParam, 9 ) )
            nMT := -1
         else
            lSyntax = .t.
         endif
      elseif cParam = "--exclude="
         if substr( cParam, 11 ) == "mem"
            cExclude += cMemTests
         else

            cExclude += strtran( strtran( strtran( substr( cParam, 11 ),  ".", 
" " ), ".", " " ), "/", " " ) + " "
         endif
      elseif cParam = "--only="
         cExclude := ""
         if substr( cParam, 8 ) == "mem"
            cParam := cMemTests
         endif
         for i := 1 to 55
            if !strzero( i, 3 ) $ cParam
               cExclude += strzero( i, 3 ) + " "
            endif
         next
      elseif cParam = "--scale"
         lScale := .t.
      else
         lSyntax = .t.
      endif
      if lSyntax
         outstd(chr(10));outstd("Unknown option:",cParam)
         outstd(chr(10));outstd("syntax: speedtst [--thread[=<num>]] 
[--only=<test(s)>] [--exclude=<test(s)>]")
         outstd(chr(10))
         return
      endif
   next
   test( nMT, cExclude, lScale )
return




func t000 ;local time, i, x := nil ;time := seconds() ;for i:=1 to 1000000 
;;next ;time := seconds() - time ;return { procname() + ": " + iif( .T., "empty 
loop overhead", "" ), time }

func t001 ;local time, i, x := nil ;local  L_C:=dtos(date()) ;time := seconds() 
;for i:=1 to 1000000 ;(  x := L_C )  ;next ;time := seconds() - time ;return { 
procname() + ": " + iif( .F., , "x := L_C" ), time }

func t002 ;local time, i, x := nil ;local  L_N:=112345.67 ;time := seconds() 
;for i:=1 to 1000000 ;(  x := L_N )  ;next ;time := seconds() - time ;return { 
procname() + ": " + iif( .F., , "x := L_N" ), time }

func t003 ;local time, i, x := nil ;local  L_D:=date() ;time := seconds() ;for 
i:=1 to 1000000 ;(  x := L_D )  ;next ;time := seconds() - time ;return { 
procname() + ": " + iif( .F., , "x := L_D" ), time }



func t004 ;local time, i, x := nil ;static  s_once,S_C ;hb_threadOnce( @s_once, 
{|| S_C := dtos( date() ) } ) ;time := seconds() ;for i:=1 to 1000000 ;(  x := 
S_C )  ;next ;time := seconds() - time ;return { procname() + ": " + iif( .F., 
, "x := S_C" ), time }



func t005 ;local time, i, x := nil ;static  s_once,S_N ;hb_threadOnce( @s_once, 
{|| S_N := 112345.67 } ) ;time := seconds() ;for i:=1 to 1000000 ;(  x := S_N ) 
 ;next ;time := seconds() - time ;return { procname() + ": " + iif( .F., , "x 
:= S_N" ), time }



func t006 ;local time, i, x := nil ;static  s_once,S_D ;hb_threadOnce( @s_once, 
{|| S_D := date() } ) ;time := seconds() ;for i:=1 to 1000000 ;(  x := S_D )  
;next ;time := seconds() - time ;return { procname() + ": " + iif( .F., , "x := 
S_D" ), time }



func t007 ;local time, i, x := nil ;memvar  M_C ;private  M_C := dtos( date() ) 
;time := seconds() ;for i:=1 to 1000000 ;(  x := M_C )  ;next ;time := 
seconds() - time ;return { procname() + ": " + iif( .F., , "x := M_C" ), time }



func t008 ;local time, i, x := nil ;memvar  M_N ;private  M_N := 112345.67 
;time := seconds() ;for i:=1 to 1000000 ;(  x := M_N )  ;next ;time := 
seconds() - time ;return { procname() + ": " + iif( .F., , "x := M_N" ), time }



func t009 ;local time, i, x := nil ;memvar  M_D ;private  M_D := date() ;time 
:= seconds() ;for i:=1 to 1000000 ;(  x := M_D )  ;next ;time := seconds() - 
time ;return { procname() + ": " + iif( .F., , "x := M_D" ), time }





func t010 ;local time, i, x := nil ;static  s_once ;memvar  P_C ;public  P_C 
;hb_threadOnce( @s_once, {|| P_C := dtos( date() ) } ) ;time := seconds() ;for 
i:=1 to 1000000 ;(  x := P_C )  ;next ;time := seconds() - time ;return { 
procname() + ": " + iif( .F., , "x := P_C" ), time }





func t011 ;local time, i, x := nil ;static  s_once ;memvar  P_N ;public  P_N 
;hb_threadOnce( @s_once, {|| P_N := 112345.67 } ) ;time := seconds() ;for i:=1 
to 1000000 ;(  x := P_N )  ;next ;time := seconds() - time ;return { procname() 
+ ": " + iif( .F., , "x := P_N" ), time }





func t012 ;local time, i, x := nil ;static  s_once ;memvar  P_D ;public  P_D 
;hb_threadOnce( @s_once, {|| P_D := date() } ) ;time := seconds() ;for i:=1 to 
1000000 ;(  x := P_D )  ;next ;time := seconds() - time ;return { procname() + 
": " + iif( .F., , "x := P_D" ), time }



func t013 ;local time, i, x := nil ;field  F_C ;use_dbsh() ;time := seconds() 
;for i:=1 to 1000000 ;(  x := F_C )  ;next ;time := seconds() - time 
;close_db() ;return { procname() + ": " + iif( .F., , "x := F_C" ), time }



func t014 ;local time, i, x := nil ;field  F_N ;use_dbsh() ;time := seconds() 
;for i:=1 to 1000000 ;(  x := F_N )  ;next ;time := seconds() - time 
;close_db() ;return { procname() + ": " + iif( .F., , "x := F_N" ), time }



func t015 ;local time, i, x := nil ;field  F_D ;use_dbsh() ;time := seconds() 
;for i:=1 to 1000000 ;(  x := F_D )  ;next ;time := seconds() - time 
;close_db() ;return { procname() + ": " + iif( .F., , "x := F_D" ), time }

func t016 ;local time, i, x := nil ;local  o := errorNew() ;time := seconds() 
;for i:=1 to 1000000 ;(  x := o:Args )  ;next ;time := seconds() - time ;return 
{ procname() + ": " + iif( .F., , "x := o:Args" ), time }

func t017 ;local time, i, x := nil ;local  o := errorNew() ;time := seconds() 
;for i:=1 to 1000000 ;(  x := o[2] )  ;next ;time := seconds() - time ;return { 
procname() + ": " + iif( .F., , "x := o[2]" ), time }

func t018 ;local time, i, x := nil ;time := seconds() ;for i:=1 to 1000000 ;(  
round( i / 1000, 2 ) )  ;next ;time := seconds() - time ;return { procname() + 
": " + iif( .F., , "round( i / 1000, 2 )" ), time }

func t019 ;local time, i, x := nil ;time := seconds() ;for i:=1 to 1000000 ;(  
str( i / 1000 ) )  ;next ;time := seconds() - time ;return { procname() + ": " 
+ iif( .F., , "str( i / 1000 )" ), time }

func t020 ;local time, i, x := nil ;local  s := stuff( dtos( date() ), 7, 0, 
"." ) ;time := seconds() ;for i:=1 to 1000000 ;(  val( s ) )  ;next ;time := 
seconds() - time ;return { procname() + ": " + iif( .F., , "val( s )" ), time }



func t021 ;local time, i, x := nil ;local  a := afill( array( 16 ),  stuff( 
dtos( date() ), 7, 0, "." ) ) ;time := seconds() ;for i:=1 to 1000000 ;(  val( 
a [ i % 16 + 1 ] ) )  ;next ;time := seconds() - time ;return { procname() + ": 
" + iif( .F., , "val( a [ i % 16 + 1 ] )" ), time }

func t022 ;local time, i, x := nil ;local  d := date() ;time := seconds() ;for 
i:=1 to 1000000 ;(  dtos( d - i % 10000 ) )  ;next ;time := seconds() - time 
;return { procname() + ": " + iif( .F., , "dtos( d - i % 10000 )" ), time }

func t023 ;local time, i, x := nil ;time := seconds() ;for i:=1 to 1000000 ;(  
eval( { || i % 16 } ) )  ;next ;time := seconds() - time ;return { procname() + 
": " + iif( .F., , "eval( { || i % 16 } )" ), time }



func t024 ;local time, i, x := nil ;local  bc := { || i % 16 } ;time := 
seconds() ;for i:=1 to 1000000 ;(  eval( bc ) )  ;next ;time := seconds() - 
time ;return { procname() + ": " + iif( .T., "eval( bc := { || i % 16 } )", 
"eval( bc )" ), time }

func t025 ;local time, i, x := nil ;time := seconds() ;for i:=1 to 1000000 ;(  
eval( { |x| x % 16 }, i ) )  ;next ;time := seconds() - time ;return { 
procname() + ": " + iif( .F., , "eval( { |x| x % 16 }, i )" ), time }



func t026 ;local time, i, x := nil ;local  bc := { |x| x % 16 } ;time := 
seconds() ;for i:=1 to 1000000 ;(  eval( bc, i ) )  ;next ;time := seconds() - 
time ;return { procname() + ": " + iif( .T., "eval( bc := { |x| x % 16 }, i )", 
"eval( bc, i )" ), time }

func t027 ;local time, i, x := nil ;time := seconds() ;for i:=1 to 1000000 ;(  
eval( { |x| f1( x ) }, i ) )  ;next ;time := seconds() - time ;return { 
procname() + ": " + iif( .F., , "eval( { |x| f1( x ) }, i )" ), time }



func t028 ;local time, i, x := nil ;local  bc := { |x| f1( x ) } ;time := 
seconds() ;for i:=1 to 1000000 ;(  eval( bc, i ) )  ;next ;time := seconds() - 
time ;return { procname() + ": " + iif( .T., "eval( bc := { |x| f1( x ) }, i 
)", "eval( bc, i )" ), time }

func t029 ;local time, i, x := nil ;time := seconds() ;for i:=1 to 1000000 ;(  
x := &( "f1(" + str(i) + ")" ) )  ;next ;time := seconds() - time ;return { 
procname() + ": " + iif( .F., , 'x := &( "f1(" + str(i) + ")" )' ), time }

func t030 ;local time, i, x := nil ;local  bc ;time := seconds() ;for i:=1 to 
1000000 ;(  bc := &( "{|x|f1(x)}" ),eval( bc, i ) )  ;next ;time := seconds() - 
time ;return { procname() + ": " + iif( .F., , 'bc := &( "{|x|f1(x)}" ), eval( 
bc, i )' ), time }

func t031 ;local time, i, x := nil ;time := seconds() ;for i:=1 to 1000000 ;(  
x := valtype( x ) +  valtype( i ) )  ;next ;time := seconds() - time ;return { 
procname() + ": " + iif( .F., , "x := valtype( x ) +  valtype( i )" ), time }



func t032 ;local time, i, x := nil ;local  a := afill( array( 16 ),  stuff( 
dtos( date() ), 7, 0, "." ) ) ;time := seconds() ;for i:=1 to 1000000 ;(  x := 
strzero( i % 100, 2 ) $ a[ i % 16 + 1 ] )  ;next ;time := seconds() - time 
;return { procname() + ": " + iif( .F., , "x := strzero( i % 100, 2 ) $ a[ i % 
16 + 1 ]" ), time }



func t033 ;local time, i, x := nil ;local  a := array( 16 ),s := dtos( date() ) 
;aeval( a, { |x,i| a[i] := left( s + s, i ), x } ) ;time := seconds() ;for i:=1 
to 1000000 ;(  x := a[ i % 16 + 1 ] == s )  ;next ;time := seconds() - time 
;return { procname() + ": " + iif( .F., , "x := a[ i % 16 + 1 ] == s" ), time }



func t034 ;local time, i, x := nil ;local  a := array( 16 ),s := dtos( date() ) 
;aeval( a, { |x,i| a[i] := left( s + s, i ), x } ) ;time := seconds() ;for i:=1 
to 1000000 ;(  x := a[ i % 16 + 1 ] = s )  ;next ;time := seconds() - time 
;return { procname() + ": " + iif( .F., , "x := a[ i % 16 + 1 ] = s" ), time }



func t035 ;local time, i, x := nil ;local  a := array( 16 ),s := dtos( date() ) 
;aeval( a, { |x,i| a[i] := left( s + s, i ), x } ) ;time := seconds() ;for i:=1 
to 1000000 ;(  x := a[ i % 16 + 1 ] >= s )  ;next ;time := seconds() - time 
;return { procname() + ": " + iif( .F., , "x := a[ i % 16 + 1 ] >= s" ), time }



func t036 ;local time, i, x := nil ;local  a := array( 16 ),s := dtos( date() ) 
;aeval( a, { |x,i| a[i] := left( s + s, i ), x } ) ;time := seconds() ;for i:=1 
to 1000000 ;(  x := a[ i % 16 + 1 ] <= s )  ;next ;time := seconds() - time 
;return { procname() + ": " + iif( .F., , "x := a[ i % 16 + 1 ] <= s" ), time }



func t037 ;local time, i, x := nil ;local  a := array( 16 ),s := dtos( date() ) 
;aeval( a, { |x,i| a[i] := left( s + s, i ), x } ) ;time := seconds() ;for i:=1 
to 1000000 ;(  x := a[ i % 16 + 1 ] < s )  ;next ;time := seconds() - time 
;return { procname() + ": " + iif( .F., , "x := a[ i % 16 + 1 ] < s" ), time }



func t038 ;local time, i, x := nil ;local  a := array( 16 ),s := dtos( date() ) 
;aeval( a, { |x,i| a[i] := left( s + s, i ), x } ) ;time := seconds() ;for i:=1 
to 1000000 ;(  x := a[ i % 16 + 1 ] > s )  ;next ;time := seconds() - time 
;return { procname() + ": " + iif( .F., , "x := a[ i % 16 + 1 ] > s" ), time }



func t039 ;local time, i, x := nil ;local  a := array( 16 ) ;aeval( a, { |x,i| 
a[i] := i, x } ) ;time := seconds() ;for i:=1 to 1000000 ;(  ascan( a, i % 16 ) 
)  ;next ;time := seconds() - time ;return { procname() + ": " + iif( .F., , 
"ascan( a, i % 16 )" ), time }



func t040 ;local time, i, x := nil ;local  a := array( 16 ) ;aeval( a, { |x,i| 
a[i] := i, x } ) ;time := seconds() ;for i:=1 to 1000000 ;(  ascan( a, { |x| x 
== i % 16 } ) )  ;next ;time := seconds() - time ;return { procname() + ": " + 
iif( .F., , "ascan( a, { |x| x == i % 16 } )" ), time }



func t041 ;local time, i, x := nil ;local  a := {},a2 := { 1, 2, 3 },bc := { 
|x| f1(x) },s := dtos( date() ),s2 := "static text" ;time := seconds() ;for 
i:=1 to 1000000 ;(  iif( i%1000==0, a:={}, ),aadd(a,{i,1,.t.,s,s2,a2,bc}) )  
;next ;time := seconds() - time ;return { procname() + ": " + iif( .F., , "iif( 
i%1000==0, a:={}, ), aadd(a,{i,1,.t.,s,s2,a2,bc})" ), time }

func t042 ;local time, i, x := nil ;local  a := {} ;time := seconds() ;for i:=1 
to 1000000 ;(  x := a )  ;next ;time := seconds() - time ;return { procname() + 
": " + iif( .F., , "x := a" ), time }

func t043 ;local time, i, x := nil ;time := seconds() ;for i:=1 to 1000000 ;(  
x := {} )  ;next ;time := seconds() - time ;return { procname() + ": " + iif( 
.F., , "x := {}" ), time }

func t044 ;local time, i, x := nil ;time := seconds() ;for i:=1 to 1000000 ;(  
f0() )  ;next ;time := seconds() - time ;return { procname() + ": " + iif( .F., 
, "f0()" ), time }

func t045 ;local time, i, x := nil ;time := seconds() ;for i:=1 to 1000000 ;(  
f1( i ) )  ;next ;time := seconds() - time ;return { procname() + ": " + iif( 
.F., , "f1( i )" ), time }



func t046 ;local time, i, x := nil ;local  c := dtos( date() ) ;time := 
seconds() ;for i:=1 to 1000000 ;(  f2( c ) )  ;next ;time := seconds() - time 
;return { procname() + ": " + iif( .T., "f2( c[1...8] )", "f2( c )" ), time }



func t047 ;local time, i, x := nil ;local  c := repl( dtos( date() ), 5000 ) 
;time := seconds() ;for i:=1 to 1000000 ;(  f2( c ) )  ;next ;time := seconds() 
- time ;return { procname() + ": " + iif( .T., "f2( c[1...40000] )", "f2( c )" 
), time }



func t048 ;local time, i, x := nil ;local  c := repl( dtos( date() ), 5000 ) 
;time := seconds() ;for i:=1 to 1000000 ;(  f2( c ) )  ;next ;time := seconds() 
- time ;return { procname() + ": " + iif( .T., "f2( @c[1...40000] )", "f2( c )" 
), time }



func t049 ;local time, i, x := nil ;local  c := repl( dtos( date() ),5000 ),c2 
;time := seconds() ;for i:=1 to 1000000 ;(  f2( @c ),c2 := c )  ;next ;time := 
seconds() - time ;return { procname() + ": " + iif( .T., "f2( @c[1...40000] ), 
c2 := c", "f2( @c ), c2 := c" ), time }



func t050 ;local time, i, x := nil ;local  a := {},a2 := { 1, 2, 3 },bc := { 
|x| f1(x) },s := dtos( date() ),s2 := "static text",n := 1.23 ;time := 
seconds() ;for i:=1 to 1000000 ;(  f3( a, a2, s, i, s2, bc, i, n, x ) )  ;next 
;time := seconds() - time ;return { procname() + ": " + iif( .F., , "f3( a, a2, 
s, i, s2, bc, i, n, x )" ), time }

func t051 ;local time, i, x := nil ;local  a := { 1, 2, 3 } ;time := seconds() 
;for i:=1 to 1000000 ;(  f2( a ) )  ;next ;time := seconds() - time ;return { 
procname() + ": " + iif( .F., , "f2( a )" ), time }

func t052 ;local time, i, x := nil ;time := seconds() ;for i:=1 to 1000000 ;(  
x := f4() )  ;next ;time := seconds() - time ;return { procname() + ": " + iif( 
.F., , "x := f4()" ), time }

func t053 ;local time, i, x := nil ;time := seconds() ;for i:=1 to 1000000 ;(  
x := f5() )  ;next ;time := seconds() - time ;return { procname() + ": " + iif( 
.F., , "x := f5()" ), time }

func t054 ;local time, i, x := nil ;time := seconds() ;for i:=1 to 1000000 ;(  
x := space(16) )  ;next ;time := seconds() - time ;return { procname() + ": " + 
iif( .F., , "x := space(16)" ), time }

func t055 ;local time, i, x := nil ;local  c := dtos( date() ) ;time := 
seconds() ;for i:=1 to 1000000 ;(  f_prv( c ) )  ;next ;time := seconds() - 
time ;return { procname() + ": " + iif( .F., , "f_prv( c )" ), time }































proc test( nMT, cExclude, lScale )


local nLoopOverHead, nTimes, nSeconds, cNum, aThreads, aResults,  mtxJobs, 
mtxResults, nTimeST, nTimeMT, nTimeTotST, nTimeTotMT,  cTest, x, i, j

create_db()












if !hb_mtvm()
   if lScale
      outstd(chr(10));outstd("scale test available only in MULTI THREAD mode")
      outstd(chr(10))
      return
   endif
   if nMT != 0
      outstd(chr(10));outstd("SINGLE THREAD mode, number of threads set to 0")
      nMT := 0
   endif
endif
outstd(chr(10));outstd(date(),time(),os())
outstd(chr(10));outstd(version() + iif( hb_mtvm(), " (MT)" + iif( nMT != 0, 
"+", "" ), "" ),"")




if lScale .and. nMT < 1
   nMT := 1
endif

outstd(chr(10));outstd("THREADS:",iif( nMT < 0, "all->" + ltrim( str( 55 ) ), 
ltrim( str( nMT ) ) ))
outstd(chr(10));outstd("N_LOOPS:",ltrim( str( 1000000 ) ))
if !empty( cExclude )
   outstd(chr(10));outstd("excluded tests:",cExclude)
endif

x :=t000()
nLoopOverHead := x[2]

if lScale
   outstd(chr(10));outstd(space(56) + "1 th." + str(nMT,3) + " th.  factor")
   outstd(chr(10));outstd(replicate("=",76))
else
   outstd(chr(10));outstd(dsp_result( x, 0 ))
   outstd(chr(10));outstd(replicate("=",68))
endif

nSeconds := seconds()
nTimes := seconds()






















































































   for i:=1 to 55
      cNum := strzero( i, 3 )
      if !cNum $ cExclude
         outstd(chr(10));outstd(dsp_result( &( "t" + cNum )(), nLoopOverHead ))
      endif
   next


nTimes := seconds() - nTimes
nSeconds := seconds() - nSeconds

if lScale
   outstd(chr(10));outstd(replicate("=",76))
   outstd(chr(10));outstd(dsp_scaleResult( "  TOTAL  ", nTimeTotST, nTimeTotMT, 
nMT, 0 ))
   outstd(chr(10));outstd(replicate("=",76))
else
   outstd(chr(10));outstd(replicate("=",68))
endif
outstd(chr(10));outstd(dsp_result( { "total application time:", nTimes }, 0))
outstd(chr(10));outstd(dsp_result( { "total real time:", nSeconds }, 0 ))
outstd(chr(10))

remove_db()
return

function f0()
return nil

function f1(x)
return x

function f2(x)
( ( x ) )
return nil

function f3(a,b,c,d,e,f,g,h,i)
( ( a ) )
( ( b ) )
( ( c ) )
( ( d ) )
( ( e ) )
( ( f ) )
( ( g ) )
( ( h ) )
( ( i ) )
return nil

function f4()
return space(4000)

function f5()
return space(5)

function f_prv(x)
   memvar PRV_C
   private PRV_C := x
return nil













static func dsp_result( aResult, nLoopOverHead )

   return padr( "[ " + left( aResult[1], 56 ) + " ]", 60, "." ) +  strtran( 
str( max( aResult[2] - nLoopOverHead, 0 ), 8, 2 ), " ", "." )

static func dsp_scaleResult( cTest, nTimeST, nTimeMT, nMT, nLoopOverHead )
   if .f.
      nTimeST := max( 0, nTimeST - nMT * nLoopOverHead )
      nTimeMT := max( 0, nTimeMT - nMT * nLoopOverHead )
   endif


   return padr( "[ " + left( cTest, 50 ) + " ]", 54, "_" ) +  str( nTimeST, 6, 
2 ) + " " + str( nTimeMT, 6, 2 ) + " ->" +  str( nTimeST / nTimeMT, 6, 2 )



static proc create_db()
   remove_db()


   dbcreate( "_tst_tmp.dbf", { {"F_C", "C", 10, 0}, {"F_N", "N", 10, 2}, 
{"F_D", "D",  8, 0} } )
   dbUseArea( .F., , "_tst_tmp.dbf", , iif(.F. .or. .T., !.T., NIL), .F.)  
   dbappend()
   FIELD->F_C := dtos(date()) 
   FIELD->F_N := 112345.67 
   FIELD->F_D := date() 
   dbCloseArea()
return

static proc remove_db()
   ferase( "_tst_tmp.dbf" )
return

static proc close_db()
   dbCloseArea()
return

static proc use_dbsh()
   dbUseArea( .F., , "_tst_tmp.dbf", , iif(.T. .or. .F., !.F., NIL), .F.)  
return











   function hb_mtvm()
   return .t.                 










   function hb_threadOnce( xOnceControl, bAction )
      local lFirstCall := .f.
      if xOnceControl == NIL
         if bAction != NIL
            eval( bAction )
         endif
         xOnceControl := .t.
         lFirstCall := .t.
      endif
   return lFirstCall



























































































































































xpp /n /m /w /p /wi /wl @C:\DOCUME~1\ADMINI~1\CONFIG~1\Temp\03166601.tmp
SPEEDTST3.PRG(197:0): warning XBT0121: STATIC variable s_once may not have been 
set before first use
SPEEDTST3.PRG(201:0): warning XBT0121: STATIC variable s_once may not have been 
set before first use
SPEEDTST3.PRG(205:0): warning XBT0121: STATIC variable s_once may not have been 
set before first use
SPEEDTST3.PRG(209:0): warning XBT0114: Usage of dynamic scoped variable M_C
SPEEDTST3.PRG(213:0): warning XBT0114: Usage of dynamic scoped variable M_N
SPEEDTST3.PRG(217:0): warning XBT0114: Usage of dynamic scoped variable M_D
SPEEDTST3.PRG(223:0): warning XBT0121: STATIC variable s_once may not have been 
set before first use
SPEEDTST3.PRG(223:0): warning XBT0114: Usage of dynamic scoped variable P_C
SPEEDTST3.PRG(223:0): warning XBT0114: Usage of dynamic scoped variable P_C
SPEEDTST3.PRG(229:0): warning XBT0121: STATIC variable s_once may not have been 
set before first use
SPEEDTST3.PRG(229:0): warning XBT0114: Usage of dynamic scoped variable P_N
SPEEDTST3.PRG(229:0): warning XBT0114: Usage of dynamic scoped variable P_N
SPEEDTST3.PRG(235:0): warning XBT0121: STATIC variable s_once may not have been 
set before first use
SPEEDTST3.PRG(235:0): warning XBT0114: Usage of dynamic scoped variable P_D
SPEEDTST3.PRG(235:0): warning XBT0114: Usage of dynamic scoped variable P_D
SPEEDTST3.PRG(269:0): warning XBT0120: LOCAL variable i may not have been set 
before first use
SPEEDTST3.PRG(554:0): warning XBT0120: LOCAL variable nTimeTotST may not have 
been set before first use
SPEEDTST3.PRG(554:0): warning XBT0120: LOCAL variable nTimeTotMT may not have 
been set before first use
SPEEDTST3.PRG(573:0): error XBT0250: Incomplete expression
SPEEDTST3.PRG(577:0): error XBT0250: Incomplete expression
SPEEDTST3.PRG(578:0): error XBT0250: Incomplete expression
SPEEDTST3.PRG(579:0): error XBT0250: Incomplete expression
SPEEDTST3.PRG(580:0): error XBT0250: Incomplete expression
SPEEDTST3.PRG(581:0): error XBT0250: Incomplete expression
SPEEDTST3.PRG(582:0): error XBT0250: Incomplete expression
SPEEDTST3.PRG(583:0): error XBT0250: Incomplete expression
SPEEDTST3.PRG(584:0): error XBT0250: Incomplete expression
SPEEDTST3.PRG(585:0): error XBT0250: Incomplete expression
SPEEDTST3.PRG(223:0): warning XBT0114: Usage of dynamic scoped variable P_C
SPEEDTST3.PRG(229:0): warning XBT0114: Usage of dynamic scoped variable P_N
SPEEDTST3.PRG(235:0): warning XBT0114: Usage of dynamic scoped variable P_D

Processing time:      0.53 secs.
_______________________________________________
Harbour mailing list
[email protected]
http://lists.harbour-project.org/mailman/listinfo/harbour

Reply via email to