Another update from ingydotnet^djgoku
This commit is contained in:
parent
91df62d461
commit
948b86eafa
7604 changed files with 108452 additions and 22726 deletions
24
Task/Active-object/J/active-object-1.j
Normal file
24
Task/Active-object/J/active-object-1.j
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
coclass 'activeobject'
|
||||
require'dates'
|
||||
|
||||
create=:setinput NB. constructor
|
||||
|
||||
T=:3 :0
|
||||
if. nc<'T0' do. T0=:tsrep 6!:0'' end.
|
||||
0.001*(tsrep 6!:0'')-T0
|
||||
)
|
||||
|
||||
F=:G=:0:
|
||||
Zero=:0
|
||||
|
||||
setinput=:3 :0
|
||||
zero=. getoutput''
|
||||
'`F ignore'=: y,_:`''
|
||||
G=: F f.d._1
|
||||
Zero=: zero-G T ''
|
||||
getoutput''
|
||||
)
|
||||
|
||||
getoutput=:3 :0
|
||||
Zero+G T''
|
||||
)
|
||||
17
Task/Active-object/J/active-object-2.j
Normal file
17
Task/Active-object/J/active-object-2.j
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
cocurrent 'testrig'
|
||||
|
||||
delay=: 6!:3
|
||||
|
||||
object=: conew 'activeobject'
|
||||
setinput__object 1&o.@o.`''
|
||||
smoutput (T__object,getoutput__object) ''
|
||||
|
||||
delay 2
|
||||
|
||||
smoutput (T__object,getoutput__object) ''
|
||||
setinput__object 0:`''
|
||||
smoutput (T__object,getoutput__object) ''
|
||||
|
||||
delay 0.5
|
||||
|
||||
smoutput (T__object,getoutput__object) ''
|
||||
Loading…
Add table
Add a link
Reference in a new issue