[comp.lang.apl] script file in J

freedman@nas.nasa.gov (Richard S. Freedman) (11/29/90)

I am using J on a Vax with BSD unix. When I create an output "log" file
using the )script command this file is empty upon exiting J.  What is the
definition of the session "log" and what should be on this file ?

R. Freedman 

ppetto@NCoast.ORG (Peter Petto) (11/30/90)

I've been using J on an IBM-PC.  In that implementation the )script
system command works just fine.  For example, the command:

)script - 'file.log'

will accept input from the keyboard (as normal) and will log
everything (commands and results) to a file called "file.log"
-- see if that works for you.  Good luck.

ljdickey@daisy.waterloo.edu (Lee Dickey) (12/02/90)

In article <1990Nov29.032733.7810@nas.nasa.gov> freedman@amelia
	(Richard S. Freedman) writes:

>I am using J on a Vax with BSD unix. When I create an output "log" file
>using the )script command this file is empty upon exiting J.  What is the
>definition of the session "log" and what should be on this file ?

The command

	)script - 'somefile'

is intended to create a file with the given name that contains a
transcript of all characters into and out of the interpreter.

There is a feature that distinguishes between input lines and output
lines.  It can be seen in this little example:

% J
J Version 1.2   Copyright (c) 1990, Iverson Software Inc.

   )script - 'temp'
   i. 3 4
0 1  2  3
4 5  6  7
8 9 10 11
   )script -
   )off
% cat -v temp
   i. 3 4
^@0 1  2  3
^@4 5  6  7
^@8 9 10 11
   )script -
% 

Upon input, lines of files that begin with ^@ are not executed.
This allows you to re-execute the commands that you gave during
a session, without re-executing the output.

In the above example the line ")script -" seems to be necessary
to write and close the file.  However, I think it is intended
that the ")off" command do the same thing.