Using Dyalog APL as a scripting language

Learning APL or new to Dyalog? Ask "silly" questions here, without fear...

Using Dyalog APL as a scripting language

Postby alexeyv on Fri Feb 03, 2017 7:41 pm

alexeyv
 
Posts: 53
Joined: Tue Nov 17, 2015 4:18 pm

Re: Using Dyalog APL as a scripting language

Postby alexeyv on Thu Apr 06, 2017 7:00 am

alexeyv
 
Posts: 53
Joined: Tue Nov 17, 2015 4:18 pm

Re: Using Dyalog APL as a scripting language

Postby woody on Thu Apr 06, 2017 2:12 pm

Maybe

⎕XLOAD WSNAME

or

)XLOAD WSNAME

?
Woodley Butler
Automatonics, Inc.

http://www.APLcloud.com
User avatar
woody
 
Posts: 78
Joined: Tue Dec 28, 2010 12:54 am
Location: Atlanta, Georgia USA

Re: Using Dyalog APL as a scripting language

Postby alexeyv on Thu Apr 06, 2017 6:32 pm

Thanks, this solves problem 1.
alexeyv
 
Posts: 53
Joined: Tue Nov 17, 2015 4:18 pm

Re: Using Dyalog APL as a scripting language

Postby woody on Thu Apr 06, 2017 10:04 pm

I found this info from the late, great Dan.

You can pass a variety of arguments when calling APL... and then dig them out with

2 ⎕NQ'.' 'getcommandlineargs'

If you use 2 ⎕NQ'.' 'getcommandlineargs' you will get all the command line arguments as a VTV (Vector of Text Vectors) which you can deal with.

There are many arguments you can give to the interpreter - they are listed in the PDF in the help folder.

Those that are not recognized by the APL interpreter are left alone. You could use this feature to pass your own arguments, e.g. PORT=4500.

Hope that helps!

//W
Woodley Butler
Automatonics, Inc.

http://www.APLcloud.com
User avatar
woody
 
Posts: 78
Joined: Tue Dec 28, 2010 12:54 am
Location: Atlanta, Georgia USA

Re: Using Dyalog APL as a scripting language

Postby jwied on Tue Apr 18, 2017 5:42 am

Instead of the latent expression, you could use a script-file "*.dyalog" with scripted APL commands - created with ]save - and pipe this into dyalog.exe:

dyalog.exe <commands.dyalog -x -q myworkspace.dws
jwied
 
Posts: 5
Joined: Wed Feb 24, 2010 7:30 am


Return to New to Dyalog?

Who is online

Users browsing this forum: No registered users and 1 guest