For Programmers: Free Programming Magazines  


Home > Archive > APL > December 2005 > APL output to ASCII ?









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author APL output to ASCII ?
phdfromic@yahoo.com

2005-12-04, 6:55 pm

Back into APL after many years, I've forgotten techniques.
Is there a way to output data from an APL workspace to ascii characters
in a native windows file ? The data is regular alphanumeric - no
special APL characters.

David Liebtag

2005-12-04, 9:55 pm

The techniques to writing to files vary from one vendor's version of APL to
another's. Which version are you using? IBM's, APL2000's, Dyalog's, or
another's?

David Liebtag


phdfromic@yahoo.com

2005-12-04, 9:55 pm

APL*PC Plus version 11 Manugistics 1993

David Liebtag wrote:
> The techniques to writing to files vary from one vendor's version of APL to
> another's. Which version are you using? IBM's, APL2000's, Dyalog's, or
> another's?
>
> David Liebtag


AA2e72E

2005-12-05, 7:55 am

First create a new file; the syntax is:
(fully qualified filename) quadNTIE tieno

e.g. 'c:\myfile.txt' quadNCREATE {high minus} 1

file name should use a mapped drive(no UNC) and the tie no must not be in
use.

Second, append the text, for vectors

(1{rotate}quadTCLF,'my text',quadTCNL) quadNAPPEND {high minus} 1

... for numbers

(1{rotate}quadTCLF,(format} 100),quadTCNL) quadNAPPEND {high minus} 1

... for arrays

(,1{rotate}quadTCLF,(format} 4 5{reshape}100),quadTCNL) quadNAPPEND {high
minus} 1

Third, untie the file

quadNUNTIE {high minus} 1

You can view the file using any text editor.

phdfromic@yahoo.com

2005-12-05, 6:56 pm

Perfect ! Thanks very much.


AA2e72E wrote:
> First create a new file; the syntax is:
> (fully qualified filename) quadNTIE tieno
>
> e.g. 'c:\myfile.txt' quadNCREATE {high minus} 1
>
> file name should use a mapped drive(no UNC) and the tie no must not be in
> use.
>
> Second, append the text, for vectors
>
> (1{rotate}quadTCLF,'my text',quadTCNL) quadNAPPEND {high minus} 1
>
> .. for numbers
>
> (1{rotate}quadTCLF,(format} 100),quadTCNL) quadNAPPEND {high minus} 1
>
> .. for arrays
>
> (,1{rotate}quadTCLF,(format} 4 5{reshape}100),quadTCNL) quadNAPPEND {high
> minus} 1
>
> Third, untie the file
>
> quadNUNTIE {high minus} 1
>
> You can view the file using any text editor.


Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com