[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

2.3.1.2 Output (#S)

The Output command simply writes its argument to the outfile, followed by a carriage return. It is the primary means by which the user annotates a response (adds codes to a test item). Cogsys variables will be substituted with their values if the `^' operator is used before the variable name.

Name:
Output
Class:
Control
Code:
#S
Syntax:
#S[text]
#S/text/
#S[text ... ^myvar ... ]
text is a string
myvar is a variable reference
Output:
The contents of text are written, substituting values of myvar if present.
History:
In Cogsys 3.0, all commands were changed to use the standard square brackets for parameters. However, because #S is such a widely used command, it still supports the older `/ ... /' delimiters, as well.

Test Files:
`OUTP_T01.IN'
tests basic operation
`OUTP_B01.IN'
time to write 1000 characters to output file

Examples:
input
#S[This goes to output]
output
`This goes to output'
input
#S[Value of V7: ^V7]
output
`Value of V7: 23'
input
#S/0234/
output
`0234'



This document was generated by Usman Muzaffar on June, 28 2000 using texi2html