Files
harbour-core/harbour/samples/hscript/hello.hs
Viktor Szakats 72526bc283 2007-10-27 01:23 UTC+0100 Viktor Szakats (harbour.01 syenar.hu)
* include/hbsetup.h
     - Removed HOST_OS_UNIX_COMPATIBLE which was a misleading 
       alias for OS_UNIX_COMPATIBLE.

   * source/compiler/hbcomp.c
     % HOST_OS_UNIX_COMPATIBLE -> OS_UNIX_COMPATIBLE

   * common.mak
   * harbour-ce-spec
   * make_xmingw.sh
   * make_xmingwce.sh
   * makefile.bc
   * makefile.gc
   * makefile.vc
   * source/pp/Makefile
   - source/pp/ppgen.c
   + source/pp/hbppgen.c
     ! executable ppgen renamed to hbppgen.

   * samples/pe/editorlo.c
   * samples/pe/pe.prg
   + samples/pe/bld_b32.bat
     + Added BCC build batch file.
     ! Fixed to compile under current Harbour.
     ! Fixed filename casing.
     ! Fixed several warnings (quite some signedness problem still remain).
     ; This is a very nice editor written in C (Harbour callable),
       I think it is the work of Ryszard.

   * samples/hscript/bld_b32.bat
   * samples/hscript/hscript.prg
   * samples/hscript/dir.hs
   * samples/hscript/multiply.hs
   * samples/hscript/ugly.hs
   * samples/hscript/hello.hs
     ! Fixed build batch file.
     ! Fixed to use NFLib file IO rather than libmisc, because 
       latter was broken (it is a clone of the NFLib file IO).
     ! Fixed scripts to use Start instead of Main as an entry 
       point otherwise __hrbRun() got confused and called the 
       app Main().
     ! Fixed some other problems to make it run.
2007-10-26 23:26:59 +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>