15.5 Ifndef Example

15.5.1 Source file (various/ifndef.cws)

<h1> This is a minimal example about ifndef statement </h1>

<h2> Simple ifndef statement </h2>

<cows>

// no_such_var has never been defined so the statements block will be
// executed

ifndef (no_such_var) {
  print ("<p> It is a surprisingly close progression from");
  print ("hunting animals to hunting and torturing people ...");
  print ("catching and lynching blacks or smoking out Jews");
  print ("during the Holocaust. <br>");
  print ("-- Aviva Cantor\n");
}

</cows>

<h2> ifndef / else statement </h2>

<cows>

// no_such_var has never been defined so the first statements block
// will be executed. The `else' block won't be executed

ifndef (no_such_var) {
  print ("<p> As long as people will shed the blood of innocent");
  print ("creatures there can be no peace, no liberty, no ");
  print ("harmony between people. Slaughter and justice cannot");
  print ("dwell together. <br>");
  print ("-- Isaac Singer\n");
} else {
  print ("<p> It is my view that the vegetarian manner of living, by");
  print ("its purely physical effect on the human temperament, would");
  print ("most beneficially influence the lot of mankind. <br>");
  print ("-- Albert Einstein\n");
}

// Now, the same ifndef/else statement above; this time we define
// no_such_var, so the `else' block will be executed

no_such_var = ""; // An empty string is considered defined

ifndef (no_such_var) {
  print ("<p> As long as people will shed the blood of innocent");
  print ("creatures there can be no peace, no liberty, no ");
  print ("harmony between people. Slaughter and justice cannot");
  print (" dwell together. <br>");
  print ("--Isaac Singer\n");
} else {
  print ("<p> It is my view that the vegetarian manner of living, by");
  print ("its purely physical effect on the human temperament, would");
  print ("most beneficially influence the lot of mankind. <br>");
  print ("-- Albert Einstein\n");
}

</cows>

<hr> See G-Cows manual for further details

15.5.2 Resulting HTML file

<h1> This is a minimal example about ifndef statement </h1>

<h2> Simple ifndef statement </h2>

<p> It is a surprisingly close progression from
hunting animals to hunting and torturing people ...
catching and lynching blacks or smoking out Jews
during the Holocaust. <br>
-- Aviva Cantor



<h2> ifndef / else statement </h2>

<p> As long as people will shed the blood of innocent
creatures there can be no peace, no liberty, no
harmony between people. Slaughter and justice cannot
dwell together. <br>
-- Isaac Singer

<p> It is my view that the vegetarian manner of living, by
its purely physical effect on the human temperament, would
most beneficially influence the lot of mankind. <br>
-- Albert Einstein



<hr> See G-Cows manual for further details

15.5.3 Resulting HTML file viewed with the Lynx text-browser


               This is a minimal example about ifndef statement

Simple ifndef statement

   It is a surprisingly close progression from hunting animals to hunting
   and torturing people ... catching and lynching blacks or smoking out
   Jews during the Holocaust.
   -- Aviva Cantor

ifndef / else statement

   As long as people will shed the blood of innocent creatures there can
   be no peace, no liberty, no harmony between people. Slaughter and
   justice cannot dwell together.
   -- Isaac Singer

   It is my view that the vegetarian manner of living, by its purely
   physical effect on the human temperament, would most beneficially
   influence the lot of mankind.
   -- Albert Einstein
     _________________________________________________________________

   See G-Cows manual for further details

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