From Web Computing Documentation
Jump to: navigation, search


Writes the given string to the selected output followed by newline character.

js.output.writeLine( name, string )

name The name of the selected output.

string The string to be written to the output.

The function serves the same purpose as js.output.write. The only difference is that this function appends the string with a newline character.


var tempResult = calculate(input);
js.output.writeLine("solution", tempResult);

The output streams are handled by the framework. You can write to as many output streams as you wish, and they can have arbitrary names. You don't need to create or initiate these streams, you can simply use js.output.write to refer to them at any time.

These streams are saved during checkpointing. What happens to these streams once the workunit finishes is determined by the work source module. If the module requests results corresponding to the name of the streams (ie. solution), they will be uploaded, while the other streams will simply be discarded.

Personal tools