* website/samples/*.*.html
% pointed compatibility .js link to the project's cloud server
86 lines
2.2 KiB
HTML
86 lines
2.2 KiB
HTML
<!DOCTYPE html>
|
|
<html xmlns="http://www.w3.org/1999/xhtml" lang="en">
|
|
<head>
|
|
<meta charset="utf-8">
|
|
<script type="text/javascript" src="http://cdnjs.cloudflare.com/ajax/libs/xregexp/2.0.0/xregexp-min.js"></script>
|
|
<script type="text/javascript" src="http://cdnjs.cloudflare.com/ajax/libs/xregexp/2.0.0/backcompat.js"></script>
|
|
<script type="text/javascript" src="/js/shCore.js"></script>
|
|
<script type="text/javascript" src="/js/shBrushHarbour.js"></script>
|
|
<link href="/css/shCore.css" rel="stylesheet" type="text/css" />
|
|
<link href="/css/shThemeDefault.css" rel="stylesheet" type="text/css" />
|
|
<script type="text/javascript">SyntaxHighlighter.all()</script>
|
|
</head>
|
|
<body>
|
|
|
|
<script type="syntaxhighlighter" class="brush: harbour; light: true"><![CDATA[
|
|
|
|
// Testing Harbour INIT and EXIT functions and initialization
|
|
// of static variables
|
|
|
|
STATIC s_static_var_accessed_in_INIT_function := 10000.15
|
|
MEMVAR p_initStatics
|
|
|
|
PROCEDURE Main()
|
|
|
|
STATIC s_static_var := "MAIN()"
|
|
|
|
? "Hello from:", s_static_var
|
|
s_static_var_accessed_in_INIT_function++
|
|
? "global static=", s_static_var_accessed_in_INIT_function
|
|
|
|
// Use PUBLIC variable created in INIT PROCEDURE
|
|
? "PUBLIC variable created in INIT PROCEDURE=", p_initStatics
|
|
|
|
RETURN
|
|
|
|
INIT FUNCTION SecondOne()
|
|
|
|
STATIC s_static_var := "SECOND()"
|
|
|
|
? "Hello from:", s_static_var
|
|
s_static_var_accessed_in_INIT_function++
|
|
? "global static=", s_static_var_accessed_in_INIT_function
|
|
|
|
RETURN NIL
|
|
|
|
INIT FUNCTION Third()
|
|
|
|
STATIC s_static_var := "THIRD()"
|
|
|
|
? "Hello from:", s_static_var
|
|
s_static_var_accessed_in_INIT_function++
|
|
? "global static=", s_static_var_accessed_in_INIT_function
|
|
|
|
RETURN NIL
|
|
|
|
EXIT FUNCTION Fifth()
|
|
|
|
STATIC s_static_var := "FIFTH()"
|
|
|
|
? "Hello from:", s_static_var
|
|
s_static_var_accessed_in_INIT_function--
|
|
? "global static=", s_static_var_accessed_in_INIT_function
|
|
|
|
RETURN NIL
|
|
|
|
EXIT FUNCTION Sixth()
|
|
|
|
STATIC s_static_var := "SIXTH()"
|
|
|
|
? "Hello from:", s_static_var
|
|
s_static_var_accessed_in_INIT_function--
|
|
? "global static=", s_static_var_accessed_in_INIT_function
|
|
|
|
RETURN NIL
|
|
|
|
INIT PROCEDURE initStatics()
|
|
|
|
PUBLIC p_initStatics := "P_INITSTATICS"
|
|
|
|
RETURN
|
|
|
|
]]></script>
|
|
|
|
</body>
|
|
</html>
|