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 online.

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


Functions and Reusable Code

Defining functions is done by including a function statement in your code. Once defined the function stays resident for the entire user session, unless overwritten. Functions support LOCAL variables. Here's an example of a simple function that builds an error message bar:


    FUNCTION error_bar(x) DO
      RETURN
        "<table border=0 width=300 bgcolor=red>" +
        "<tr><td>" +
        "<font color=white>" + x + "</font>"+
        "</table>"
      /RETURN
    /FUNCTION

Now, throughout your program, to display an error message, one can write DISPLAY error_bar("Please enter full name.") /DISPLAY.

H2O FUNCTIONs support recursion, the ability
for FUNCTIONs to call themselves. For example, a factorial function can be defined by writing:


    FUNCTION myfactorial(x) LOCALS out DO
      IF x > 1 THEN
        out=x*myfactorial(x-1)
      ELIF INSINTEGER(x) != "TRUE" THEN
        out="ERROR"
      ELSE
        out=1
      /IF
      RETURN out /RETURN
    /FUNCTION


Functions may be placed in code or in files (library) and EXPANDed. To load code and functions from a file one uses the tag EXPAND. Suppose your code was stored in functions/library.lib. Then you could write:

    EXPAND FILE="functions/filename.txt" /DISPLAY


Program Forking
H2O supports user-session forking. A "FORK" is a new user-session that inherits the current user-session. For example:


    <A FORK="/mypopup.html" TARGET="NewWin>Popup Window</A>


A FORK link looks like an HREF link, with the HREF replaced with the word FORK. Activity in forked user sessions has no affect on the parent application until data is passed back to it.

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