for I/O-Targets < List of Argument-Commands < [click go-back button to go-back] < Viivi's Cell < Entrance
The argument-commands listed here are used to operate
the standard-input source,
the standard-output destination,
the standard-error-output destination,
and the transcript-output destination.
The target for the input-source or the output-destinations
is shown with
<TARGET>
regardless its type.
Each <TARGET>
specifically means one of the
Viivi I/O-targets:
a file,
a network-port,
or
a virtual-port.
The argument-commands are shown below in the alphabetic order.
Although the examples are all shown for the kernel-mode
(with -K
),
they are similarly used for the IDE-mode
(with -G
)
as well.
-a <TARGET>
The small character
'a
'
is an acronym for "argument-command script".
Here,
<TARGET>
must be a file and is called as "an argument-command script file",
in which an argument-command sequence is described.
It is recommended to add a filename extension
.vacs
(an abbreviation for
"Viivi argument-command script
")
to the name of the argument-command script file.
The argument-command sequence in the file will be
[Example]
$ viivi -K -a experiment3.vacs
Viivi reads the argument-command script file
"experiment3.vacs
"
and executes the argument-command sequence in the file.
[Equivalence]
This function is available only with the argument-command.
There are no equivalent procedure-calls or setting-panel items.
-e <TARGET>
The small character
'e
'
is an acronym for "error-output".
It changes the standard-error-output destination to
<TARGET>
.
[Example]
$ viivi -K -e errorOutput.txt
After changing the standard-error-output destination to the file
"errorOutput.txt
",
input from the standard-input will be evaluated.
[Example]
$ viivi -K -e /dev/stdout -i test.scm
Firstly it changes the standard-error-output destination to the file
"/dev/stdout
"
(the standard-output device file for Unix-like platforms).test.scm
"
will be evaluated.
[Example]
$ viivi -K -e suuritammi:59637
After changing the standard-error-output destination to the network-port
59637
on the host of the name
"suuritammi
",
input from the standard-input will be evaluated.
[Example]
$ viivi -K -e 192.168.20.51:59494
After changing the standard-error-output destination to the network-port
59494
on the host of the IP-address
"192.168.20.51
",
input from the standard-input will be evaluated.
[Example]
$ viivi -K -e :29914
After changing the standard-error-output destination to the network-port
"29914
"
on the localhost,
input from the standard-input will be evaluated.
This is equivalent to
$ viivi -K -e localhost:29914
[Equivalence]
This function is available only with the argument-command.-f <TARGET>
The small character
'f
'
is an acronym for "file"
or for "finally input from the standard-input".
It evaluates input from
<TARGET>
and then input from the standard-input will be evaluated.
When argument-commands with multiple source-targets are given
and if they include one or more with the argument-command
"-f
",
input from the standard-input will be evaluated finally
after all the evaluations from the specified source-targets have been done.
[Example]
$ viivi -K -f ../scheme/first.scm
After evaluating the contents of the file
"../scheme/first.scm
",
input from the standard-input will be evaluated.
[Example]
$ viivi -K -f prepare.scm -i test1.scm
The contents of the file
"prepare.scm
"
are evaluated first, the contents of the file
"test1.scm
"
are evaluated next, and finally
input from the standard-input will be evaluated. $ viivi -K -f prepare.scm -f test1.scm
$ viivi -K -i prepare.scm -f test1.scm
$ viivi -K -f prepare.scm test1.scm
[Example]
$ viivi -K -f :11291
After evaluating input from the network-port
11291
on the
(localhost
)
is evaluated,
input from the standard-input will be evaluated.
[Equivalence]
This function is available only with the argument-command.-i <TARGET>
The small character
'i
'
is an acronym for "input".
Input from
<TARGET>
is evaluated.
[Example]
$ viivi -K -i tools.scm -i main.scm
Firstly the contents of the file
"tools.scm
"
is evaluated,
and then the contents of the file
"main.scm
"
is evaluated sequentially. $ viivi -K -i tools.scm main.scm
$ viivi -K tools.scm main.scm
[Example]
$ viivi -K -i :46497
Input from the network-port
46497
on the
localhost
is evaluated. $ viivi -K -i localhost:46497
$ viivi -K localhost:46497
$ viivi -K :46497
[Equivalence]
This function is available only with the argument-command.-L <TARGET>
The capital letter
'L
'
is an acronym for "Library".
Library-input from
<TARGET>
and then specified subsequent input will be evaluated.
When no source-targets for the subsequent input are specified,
input from the standard-input will be evaluated.
"Library-Input" does not perform at all output,
both of those to the standard-output/standard-error-output ports and those by the side-effects,
which should be done in the usual evaluation.
The purpose of this argument-command is to provide a method to load the Scheme codes,
which have been well tested and are reliable,
as libraries beforehands.
As the user is interested only in the internal effects of the libraries but not in the output,
it is convenient to use this silent argument-command to prepare the tools for the main code.
If the output is also needed, use the other argument-commands for input,
such as
-i
and
-f
.
[Example]
$ viivi -K -L characters.scm -L dungeonMap3.scm -i rpg.scm
Firstly library-input from the files
"characters.scm
"
and
"dungeonMap3.scm
",
and then the contents of the file
"rpg.scm
"
are evaluated.
[Example]
$ viivi -K -L /usr/local/lib/scheme/fft.slib -i frqAnlz.scm
Firstly library-input from the file
"fft.slib
"
located in
"/usr/local/lib/scheme/
"
and then the contents of the file
"frqAnlz.scm
"
are evaluated..slib
"
to be distinguished as a Scheme library which has been well tested and is reliable.
[Equivalence]
This function is available only with the argument-command.-O <TARGET>
The capital letter
'O
'
is an acronym for "Output" or "Overwrite".
It changes the standard-output destination to
<TARGET>
.
Note that
when
<TARGET>
is an existing file, then it will be overwritten.
If you want to keep the contents of the existing file
and to append the new output contents to the end of the file,
please use the other argument-command
"-o
".
[Example]
$ viivi -K -O output.result
After changing the standard-output destination to the file
"output.result
",
input from the standard-input will be evaluated.output.result
",
already exists, its contents will be overwitten.
[Example]
$ viivi -K -O kotkanpoika:42809
After changing the standard-output destination to the network-port
42809
on the host
"kotkanpoika
",
input from the standard-input will be evaluated. $ viivi -K -o kotkanpoika:42809
[Example]
$ viivi -K -i foo.scm -O bar.data -i baz.scm
Firstly, the contents of the file
"foo.scm
"
is evaluated.bar.scm
",
and then the contents of the file
"baz.scm
"
will be evaluated.bar.scm
"
exists, it will be overwritten.
[Equivalence]
This function is available only with the argument-command.-o <TARGET>
The small character
'o
'
is an acronym for "output".
It changes the standard-output destination to
<TARGET>
.
Note that
when
<TARGET>
is an existing file, the newly output contents
will be appended to the end of the file
(i.e., the file is NOT overwritten).
If you want to overwrite the existing file,
please use the other argument-command
"-O
".
[Example]
$ viivi -K -o output.result
After changing the standard-output destination to the file
"output.result
",
input from the standard-input will be evaluated.output.result
"
already exists,
the newly output contents will be appended to the end of the file.
[Example]
$ viivi -K -o 192.168.12.34:56789
After changing the standard-output destination to the network-port
56789
on the host
"192.168.12.34
",
input from the standard-input will be evaluated. $ viivi -K -O 192.168.12.34:56789
[Example]
$ viivi -K -o dst1.txt -i src1.scm -o dst2.txt -i src2.scm
Firstly,
the standard-output destination is changed to the file
"dst1.txt
",
and then the contents of the file
"src1.scm
"
is evaluated.dst2.txt
",
and then the contents of the file
"src2.scm
"
is evaluated.dst1.txt
"
and
"dst2.txt
"
exist, the newly output contents will be appended to the end of the files, respectively. $ viivi -K -i src1.scm -o dst1.txt -i src2.scm -o dst2.txt #WRONG!
The evaluation results of the input source file
"src1.scm
"
will be written to the default standard-output of the platform.src2.scm
"
will be appended to the end of the output destination file
"dst1.txt
".dst2.txt
".
[Equivalence]
This function is available only with the argument-command.-p <TARGET>
The small character
'p
'
is an acronym for "project".
Here,
<TARGET>
must be a file and is called as "a project file",
in which information on the project is described.
It is recommended to add a filename extension
.vprj
(an abbreviation for
"Viivi project
")
to the name of the project file.
This argument-command reads the project file
<TARGET>
and build Viivi IDE according to the settings in the project.
Because the project function is available
only with the IDE-mode,
it is not necessary to specify the IDE-mode with
-G
.
[Example]
$ viivi -p nn2layers.vprj
Viivi IDE will be booted-up based on the settings in the project file
"nn2layers.vprj
".
[Equivalence]
This function is available only with the argument-command.-t <TARGET>
The small character
't
'
is an acronym for "transcript-output".
Viivi starts the transcript-output to the output destination
<TARGET>
.
When
<TARGET>
is an existing file, the output contents will be ALWAYS appended to the end of the file.
If another transcript-output has already been made,
the output-port for the current transcript-output is closed first,
and then a new transcript-output is started to the specified destination
<TARGET>
.
[Example]
$ viivi -K -t carbonCopy.log
After setting the transcript-output destination to the file
"carbonCopy.log
"
and starting transcript-output,
then input from the standard-input will be evaluated.
[Equivalence]
・procedure call: (transcript-on <TARGET>)
There are no equivalent setting-panel items.-tX
The small character
't
'
is an acronym for "transcript-output",
and the capital letter
'X
'
represents the "closing" action.
Being provided with this argument-command,
Viivi closes the current transcript-output port.
When no transcript-output port is open, nothing will be made.
This argument-command does not take any parameters.
[Equivalence]
・procedure call: (transcript-off)
There are no equivalent setting-panel items.-x <SCHEME-CODE>
The character
'x
'
is an acronym for "execution".
This argument-command is to evaluate the Scheme code
<SCHEME-CODE>
directly provided on the command-line.
This argument-command is disabled in the current version.
<TARGET> <TARGET> ...
Only at the end of the argument-command sequence, when multiple input-sources are provided as
<TARGET> <TARGET> ...
then the argument-command
"-i
"
can be omitted before each
<TARGET>
.-i
"
is automatically compensated before each
<TARGET>
.
[Example]
$ viivi -K heidi.scm klara.scm peter.scm
The contents in the files
"heidi.scm
",
"klara.scm
",
and "peter.scm
"
are evaluated sequentially. $ viivi -K -i heidi.scm -i klara.scm -i peter.scm
[Example]
$ viivi -K :17771 paul.scm :17772 elizabeth.scm
Input from the network-port
17771
on the
localhost
,
the contents of the file
"paul.scm
",
input from the network-port
17772
on the
localhost
,
and the contents of the file
"elizabeth.scm
"
are evaluated sequentially. $ viivi -K -i :17771 -i paul.scm -i :17772 -i elizabeth.scm
[Equivalence]
This function is available only with the argument-command.for I/O-Targets < List of Argument-Commands < [click go-back button to go-back] < Viivi's Cell < Entrance
Exhibited on 2022/03/02
Copyright(C) 2003-2022 ilma <ilma@viivi.io> All rights reserved.