Use a function like this one to execute a host command and get the result into
a variable.
ps: still debugging this one.
∇Execute[⎕]∇
∇
[0] z←Execute cmd;⎕io;fh
[1] ⎕io←0
[2] fh ← ⎕FIO[24] cmd
[3] z←⎕av[⎕fio [8] fh]
[4] Loop: →(0≠⎕FIO[10] fh)/Fini
[5] z←z,⎕av[⎕fio [8] fh]
[
∇Execute[⎕]∇
∇
[0] z←Execute cmd;⎕io;fh
[1] ⎕io←0
[2] fh ← ⎕FIO[24] cmd
[3] z←⎕av[⎕fio [8] fh]
[4] Loop: →(0≠⎕FIO[10] fh)/Fini
[5] z←z,⎕av[⎕fio [8] fh]
[6] →Loop
[7] Fini: ⎕FIO[25] fh
[8] ⊃⊃z
∇
)save
2016-03-05 00:20:57 (GMT-5) CONTINUE
D Execute 'date'
Hi Xtian,I'm not sure I follow what you are saying. That may be because I don't know what fflush() does...I'll do some reading. Are you suggesting the code I presented does not function? it does, its just a kludge.-Alex
On 2016-03-04 21:54, alexwei...@alexweiner.com wrote:
./shellscript.sh yadda.file yadda.file.new
I would use popen("./shellscript.sh yadda.file yadda.file.new","r")
then "pclose()" on the stream when it return EOF
rather than ")host ./shellscript.sh yadda.file yadda.file.new"
Zh ← As ⎕F
I think you will have to "fflush()" the stream *before* it will be available in
any )host command
Zi ← ⎕FIO[16] Bh fflush(Bh)
( From ⎕FIO '' )
Xtian.
On 2016-03-04 21:54, alexwei...@alexweiner.com wrote:
Hi Bug-apl,
Currently, at a point in my code I do something like this:
⍝assume the v
Hi Bug-apl,Currently, at a point in my code I do something like this:⍝assume the variable 'yadda' exists and is correctly formed, as well as the read_file functionsuccess←yadda ⎕fio[7] tie← 'wr'⎕FIO[3] "yadda.file")host ./shellscript.sh yadda.file yadda.file.newyadda_new← read_file "yadda.file.new"
)load CONTINUE
SAVED 2016-03-04 21:36:54 (GMT-5)
0
1
1
2
3
5
8
13
21
34
55
89
Hi,
When trying to get element by index from the array specified to the left
side, there is a difference in behavior:
100 200[1]
RANK ERROR
100 200[1]
^ ^
However:
(100 200)[1]
┌───┐
│100│
└───┘
In Dyalog APL both expression gives the same result.
Is it a bug or different unde
Hi Robert,
it is indeed an debug printout that should have been removed.
Fixed in SVN 701.
/// Jürgen
On 03/04/2016 03:12 AM, Christian
Robert wrote:
Second
though, it looks like a piece of debug code forgotten i