Fork: Difference between revisions

Content added Content deleted
(add ooRexx)
(→‎{{header|ooRexx}}: add version 2 using the START method)
Line 672: Line 672:


=={{header|ooRexx}}==
=={{header|ooRexx}}==
===version 1 using REPLY===
<lang oorexx>sub=.fork~new
<lang oorexx>sub=.fork~new
sub~sub
sub~sub
Line 693: Line 694:
program 11:16:13
program 11:16:13
subroutine 11:16:13
subroutine 11:16:13
program 11:16:15</pre>
program 11:16:15</pre>

===version 2 using START===
<lang oorexx>sub=.fork~new
sub~start('start_working')

Call syssleep 1
Do 3
Say 'program ' time()
Call syssleep 1
End

::class fork
:: method start_working
Do 6
Say 'subroutine' time()
Call syssleep 1
End</lang>
{{out}}
<pre>subroutine 14:55:10
program 14:55:11
subroutine 14:55:11
subroutine 14:55:12
program 14:55:12
program 14:55:13
subroutine 14:55:13
subroutine 14:55:14
subroutine 14:55:15</pre>


=={{header|Oz}}==
=={{header|Oz}}==