Files
harbour-core/harbour/contrib/examples/hscript/hello.hs
Viktor Szakats 6e47dd35f5 2007-11-10 18:03 UTC+0100 Viktor Szakats (harbour.01 syenar.hu)
* Makefile
   - samples
   + contrib/examples
   * contrib/Makefile
   * contrib/examples/Makefile
   * contrib/examples/guestbk/inifiles.prg
   * contrib/examples/guestbk/testcgi.prg
   * contrib/examples/guestbk/bld_b32.bat
   * contrib/examples/guestbk/Makefile
   * contrib/examples/pe/pe.prg
   * contrib/examples/pe/Makefile
   * contrib/examples/misc/Makefile
   * contrib/examples/hscript/bld_b32.bat
   * contrib/examples/hscript/Makefile
   * contrib/examples/Makefile
     * Moved /samples to /contrib/examples
2007-11-10 17:04:20 +00:00

41 lines
717 B
Haskell

<%
/*
*
* hello.hs
* Famous "Hello World"!
*
* Written by Felipe Coury <fcoury@flexsys-ci.com>
* www - http://www.harbour-project.org
*
*/
FUNCTION Start()
// Add content-type parameter if using active page on a Web Server
IF !empty( GetEnv( "SERVER_NAME" ) )
OutStd( "HTTP/1.0 200 OK" + chr(10) )
OutStd( "CONTENT-TYPE: TEXT/HTML" + chr(10) + chr(10) )
ENDIF
%>
<HTML>
<HEAD>
<TITLE>Hello world!</TITLE>
</HEAD>
<BODY>
<%
// Now saying hello to the world in 3 different ways:
// 1. Pure harbour:
OutStd( "<H1>Hello world!</H1></P>" )
// 2. Hybrid harbour-html:
%>
<H1><% OutStd( "Hello world!" ) %></H1></P>
<%
// 3. Pure html:
%>
<H1>Hello world!</H1></P>
</BODY>
</HTML>