[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Bug-apl] ⎕NL 'var_name'
From: |
Christian Robert |
Subject: |
[Bug-apl] ⎕NL 'var_name' |
Date: |
Tue, 10 Mar 2015 20:16:43 -0400 |
User-agent: |
Mozilla/5.0 (Windows NT 6.3; WOW64; rv:31.0) Gecko/20100101 Thunderbird/31.5.0 |
Hi,
I'm pretty sure this was working a few days ago to test if a variable has a
value or not at entry to a function.
Is it broken or I miss something ?
thanks,
Xtian.
∇Time[⎕]∇
∇
[0] z←ncpu Time what;⎕io;start;stop;day;old_ncpu
[1] →(1=⎕NL 'ncpu')/already_set
[2] ncpu←1 ⍝ the default
[3] already_set:
[4] ⎕io←0
[5] start←¯5↑⎕ts
[6] day←start[0]
[7] start ← 32 24 60 60 1000 ⊥ start
[8] old_ncpu←⎕SYL [25;1]
[9] ⍎what
[10] stop←¯5↑⎕ts
[11] ⎕SYL [25;1]← old_ncpu
[12] →(stop[0]=day)/ok
[13] stop[0]←stop[0]+1
[14] ok:
[15] stop ← 32 24 60 60 1000 ⊥ stop
[16] z←(⍕(stop-start)÷1000),' seconds at num core = ',(⍕⎕syl[25;1]),' of ',
⍕⎕syl[24;1]
∇
Time 'z←⍳1000'
DOMAIN ERROR
Time[1] →(1=⎕NL 'ncpu')/already_set
^ ^
- [Bug-apl] ⎕NL 'var_name',
Christian Robert <=