Chapter 22 The Type Mode

Table of Contents
22.1 Displaying Large Amounts of HTML Code
22.2 The type Statement
22.3 Typing into a variable

Type Mode allows to insert plain HTML code within your scripts and get a verbatim copy in output file while still accessing a limited set of Cows' features.

From version 1.1 the Type Mode also allows to write into a variable. This is very useful if you want to store large amounts in a variable, and use it later in you script.

22.1 Displaying Large Amounts of HTML Code

When you need to display large amounts of HTML code, in order to avoid a lot of print () or echo () statements, you can simply leave it outside Cows tags:

<cows author1 = "-- Jennie Garth";
      author2 = "-- Arthur Schopenhauer"; />

<p> I've always been very bonded to animals -- more so than most
    people. (laughs)
    I don't think that they can defend themselves, so we have to
    help them.
<cows print (author1); />

<p> All truth passes through three stages. First, it is ridiculed.
    Second, it is violently opposed. Third, it is accepted as being
    self-evident.
<cows print (author2); />

<hr>

<cows print ("Updated: " + date ("#d #M #y")); />

This will work, as you can see from the output below:

<p> I've always been very bonded to animals -- more so than most
    people. (laughs)
    I don't think that they can defend themselves, so we have to
    help them.
-- Jennie Garth

<p> All truth passes through three stages. First, it is ridiculed.
    Second, it is violently opposed. Third, it is accepted as being
    self-evident.
-- Arthur Schopenhauer

Since witching in and out Cows tags can be very annoying, whenever you need to display large amount of HTML code and expand variables and functions you can use the type statement.

This manual can be downloaded from http://www.g-cows.org/.