Files
harbour-core/harbour/website/samples/dosshell.prg.html
Viktor Szakats 300160d8b0 2012-09-22 12:05 UTC+0200 Viktor Szakats (harbour syenar.net)
+ website
    + Added Harbour website (except art, docs and stat subdirs)
    ; TODO: configure automatic mechanism to extract site from
            here and regularly updload to sf.net web area
    ; TODO: Clean HTML code, remove unused picture/files, avoid JS
            Any takers?
    ; NOTE: Please make modifications to website code only in
            SVN, then upload the content to web server manually.
            IOW never update on web server directly.
2012-09-22 10:17:39 +00:00

54 lines
3.0 KiB
HTML

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3c.org/TR/1999/REC-html401-19991224/loose.dtd">
<HTML xmlns="http://www.w3.org/1999/xhtml"><HEAD><TITLE>dosshell.prg</TITLE>
<META http-equiv=Content-Type content="text/html; charset=iso-8859-1">
<META content="MSHTML 6.00.6000.16386" name=GENERATOR>
<STYLE type=text/css>
<!--
body { color: #000000; background-color: #FFFFFF; }
.any1-activedot { color: #800080; }
.any1-comment { color: #008080; }
.any1-constant { color: #800080; }
.any1-escapeampersand { color: #00FF00; font-weight: bold; }
.any1-function { color: #808000; }
.any1-identifier { color: #000000; }
.any1-number { color: #FF0000; }
.any1-preprocessor { }
.any1-reservedword { color: #800000; }
.any1-space { }
.any1-string { color: #0000FF; }
.any1-symbol { }
.any1-variable { color: #808000; }
-->
</STYLE>
</HEAD>
<BODY bgColor=#ffffff>
<PRE><CODE><SPAN style="FONT: 10pt Courier New"><SPAN class=any1-comment>//
// DosShell
//
// This program shell to DOS
//
// Warning : DOS only
//
// Written by Eddie Runia &lt;eddie@runia.com&gt;
// www - http://harbour-project.org
//
// Placed in the public domain
//
</SPAN><SPAN class=any1-reservedword>function</SPAN><SPAN class=any1-space> </SPAN><SPAN class=any1-variable>Main</SPAN><SPAN class=any1-symbol>()
</SPAN><SPAN class=any1-reservedword>local</SPAN><SPAN class=any1-space> cOs := </SPAN><SPAN class=any1-function>Upper</SPAN><SPAN class=any1-symbol>( </SPAN><SPAN class=any1-function>OS</SPAN><SPAN class=any1-symbol>() )
</SPAN><SPAN class=any1-reservedword>local</SPAN><SPAN class=any1-space> cShell := </SPAN><SPAN class=any1-function>GetEnv</SPAN><SPAN class=any1-symbol>(</SPAN><SPAN class=any1-string>"COMSPEC"</SPAN><SPAN class=any1-symbol>)
</SPAN><SPAN class=any1-reservedword>if</SPAN><SPAN class=any1-space> </SPAN><SPAN class=any1-function>at</SPAN><SPAN class=any1-symbol>( </SPAN><SPAN class=any1-string>"WINDOWS"</SPAN><SPAN class=any1-symbol>, cOs ) != </SPAN><SPAN class=any1-number>0</SPAN><SPAN class=any1-space> .or. </SPAN><SPAN class=any1-function>at</SPAN><SPAN class=any1-symbol>( </SPAN><SPAN class=any1-string>"DOS"</SPAN><SPAN class=any1-symbol>, cOs ) != </SPAN><SPAN class=any1-number>0</SPAN><SPAN class=any1-space> ;
.or. </SPAN><SPAN class=any1-function>at</SPAN><SPAN class=any1-symbol>( </SPAN><SPAN class=any1-string>"OS/2"</SPAN><SPAN class=any1-symbol>, cOs ) != </SPAN><SPAN class=any1-number>0
</SPAN><SPAN class=any1-space> ? </SPAN><SPAN class=any1-string>"About to shell to DOS.."
</SPAN><SPAN class=any1-space> ! (cShell)
? </SPAN><SPAN class=any1-string>"Hey, I am back !"
</SPAN><SPAN class=any1-space> </SPAN><SPAN class=any1-reservedword>else
</SPAN><SPAN class=any1-space> ? </SPAN><SPAN class=any1-string>"Sorry this program is for Windows, DOS, and OS/2 only"
</SPAN><SPAN class=any1-space> </SPAN><SPAN class=any1-reservedword>endif
return</SPAN><SPAN class=any1-space> nil
</SPAN></SPAN>
</CODE></PRE></BODY></HTML>