Riverwatcher Active Content Environment

RACE Documentation:

OUTPUT - Outputting text to files or the browser

  • FILE - Filename to write to.
  • APPEND - If specified, RACE will append data to the file, rather than overwrite it.
Example - Saving text to a file

<define var="$count">1</define>
<output file="numbers.txt"><while test="<$count> < 30"><$count.add(display)>


Example - Appending to a file

<if test="<$error> != ''">
<output append file="errorlog">

This code checks if the variable <$error> is empty or not. If it is not empty, the contents are appended to a file called errorlog.

Example - Outputting text to the browser

<system output="off">
This text will not be displayed because system output is set to off. However, text within an output tag will be displayed.
<define var="$count">0</define>
<while test="<$count> <= 10">
  <if test="<$count.isinteger(even)> > 0">
    <output><$count> is an even number<br></output>

2 is an even number
4 is an even number
6 is an even number
8 is an even number
10 is an even number

note: See the documentation for the SYSTEM tag for further examples.

RACE Documentation

Copyright 2009 Riverwatcher, Inc. Hosting by Riverwatcher Studios