Home    Cart    Free Download    Manual

Installation:
  Free Downloads
  The H2O Family
  Install Notes

Programming:
  Prerequisites
  H2O Whitepaper
  Online Manual
  Code Examples
  H2O Free Support


What's H2O?
H2O is programming made for the web.

What's it like?
H2O is English-like. If you know some Perl, VB, ASP, or PhP you'll be immediately productive in H2O. It runs on Linux, Mac, Unix, and Windows.

How do I try it?
Download H2O for free. Get it from hosting providers. Or buy on-line.

Where does H2O come from?
The language was invented by Aestiva. H2O stands for:
   HTML with
   HTML/OS
   Overlays.


Simple Counter
Code that creates a web page counter. The counter is text file with a name similar to the web page's name. The counter for the page abc.html, for example, would be, abc_counter.txt. Variations of this page shown below.

counter.html


<html>
<title>Simple Page Counter</title>
<body bgcolor=#FFFFFF>

<<
mycounter=REPLACE(page,".html","_counter.txt")
COPY FILE=mycounter TO pagecounter /COPY
IF ISINTEGER(pagecounter) THEN
pagecounter=pagecounter+1 ELSE pagecounter=1 /IF
COPY pagecounter TO FILE=mycounter /COPY
>>

<br><br>
<center>
My Counter is <<pagecounter>><br>
<a href=counter.html>RELOAD</a> to see page counter grow.
</html>



NOTE:
This page requires you cut and paste the code at the top in each page.
Another way to do this is to put the code in a variable and "expand" that
on each page. To do that, change the Overlay at the top to:


<<
mycounter=^
mycounter=REPLACE(page,".html","_COUNT.txt")
COPY FILE=mycounter TO pagecounter /COPY
IF ISINTEGER(pagecounter) THEN
pagecounter=pagecounter+1 ELSE pagecounter=1 /IF
COPY pagecounter TO FILE=mycounter /COPY
^
>>

Then, on each page, add the overlay:

<<$mycounter>>

That way, you only define mycounter once, on the first page of your
site. Since H2O variables stay in memory, other pages will only need the

<<$mycounter>> overlay. If you have multiple entrances to a site
then you can alternatively save the code in a file. In that case you would
place on each page:

<<EXPAND FILE="/lib/counter_code.txt" /EXPAND>>

MORE NOTES:
The ^ character is an H2O quoting character. (H2O has three quoting characters,
the single quote, double quote and caret).

The $ character is the expand character. When placed immediately before a
variable name, H2O inserts the contents of the variable into the code. It's a
shortcut for EXPAND varname /EXPAND.

Home | Cart | Free Download | Online Manual
COPYRIGHT © 2005 Aestiva, LLC. ALL RIGHTS RESERVED.