* package/*
* src/compiler/harbour.y
* src/compiler/harbour.yyc
* src/macro/macro.y
* src/macro/macro.yyc
* src/pp/hbpp.1
* tests/*/*
* utils/*
* stripped svn header manually
* tests/hbdocext.hb
* tests/lang2po.hb
* tests/big5_gen.prg
* tests/uc16_gen.prg
* do not add svn ids to generated sources
+ tests/stripsvn.hb
+ added script to strip svn header from sources
32 lines
787 B
Plaintext
32 lines
787 B
Plaintext
/*
|
|
* Harbour Project source code:
|
|
* demonstration/test code for thread return complex values
|
|
* and detached locals created by thread and used after thread
|
|
* termination.
|
|
*
|
|
* Copyright 2008 Przemyslaw Czerpak <druzus / at / priv.onet.pl>
|
|
* www - http://harbour-project.org
|
|
*
|
|
*/
|
|
|
|
#ifdef __XHARBOUR__
|
|
#xtranslate hb_threadStart( <x,...> ) => StartThread( <x> )
|
|
#xtranslate hb_threadJoin( <x,...> ) => JoinThread( <x> )
|
|
#endif
|
|
|
|
static s_var
|
|
proc main()
|
|
local xResult
|
|
? Version()
|
|
? "join:", hb_threadJoin( hb_threadStart( @thFunc() ), @xResult )
|
|
? "result:", xResult
|
|
? "static var type:", valtype( s_var )
|
|
? eval( s_var )
|
|
? eval( s_var )
|
|
return
|
|
|
|
func thFunc()
|
|
local i := 12345.678
|
|
s_var := {|| i++ }
|
|
return replicate( "Hello World!!! ", 3 )
|