On Wed, 17 Jun 2009, Pritpal Bedi wrote:
Hi
> Przemyslaw Czerpak-2 wrote:
> > proc main()
> > dbCreate( "_tst", { { "F","C",10,0 } } )
> > use _tst alias "tst1" new shared
> > dbRelease()
> > use _tst alias "tst1" new shared
> > WorkSpaceEval( {|| doTest() } )
> > return
> > proc doTest()
> > local i, n
> > n := select()
> > ? "Current workarea: ", ltrim( str( n ) ), "alias:", alias(), ;
> > "(verify:" + ltrim( str( select( alias() ) ) ) + ")"
> > ? "All active workareas in thread workspace:"
> > for i := 1 to 255
> > select( i )
> > if used()
> > ? " workarea:", ltrim( str( i ) ), "alias:", alias()
> > endif
> > next
> > select( n )
> > return
> c:\harbour\tests>wareas
> Current workarea: 1 alias: TST1 (verify:1)
> All active workareas in thread workspace:
> workarea: 1 alias: TST1
> Current workarea: 2 alias: (verify:0)
> All active workareas in thread workspace:
> workarea: 1 alias: TST1
> Current workarea: 7 alias: (verify:0)
> All active workareas in thread workspace:
> workarea: 1 alias: TST1
> Current workarea: 183 alias: (verify:0)
> All active workareas in thread workspace:
> workarea: 1 alias: TST1
Thank you for test but I do not understand the results at all.
Why doTest() is executed 4 times not two?
And the second thing. I wanted to iterate ZEROSPACE and I made typo.
The line with WorkSpaceEval() should be changed to:
WorkSpaceEval( {|| doTest() }, 2 )
can you repeat your test with such version.
best regards,
Przemek
_______________________________________________
Harbour mailing list
[email protected]
http://lists.harbour-project.org/mailman/listinfo/harbour