FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index mod_harbour Opening And Closing mod harbour Tags
Posts: 6984
Joined: Fri Oct 07, 2005 07:07 PM
Opening And Closing mod harbour Tags
Posted: Tue Oct 19, 2021 03:24 PM

The mod harbour syntax is a set of rules that define how a program should be written. mod harbour is, in that sense, no different from any other language.

The mod harbour interpreter expects certain rules to be followed, and will spit errors at you if they are not followed.

All code written in mod harbour must be identified as mod harbour code.

A set of tags are used to mark the beginning and end of a block of code, in between which any amount of code can be written.

The standard opening tag is:
<%prg

The standard closing tag is:

?>

These tags can be used to jump in and out of "mod harbour mode" any number of times in a mod harbour file, including a mod harbour file containing HTML elements.

<?prg / Code Can Go Here / ?>
<html>
<head>
<?prg / Code Can Go Here / ?>
</head>
<body>
<?prg / Code Can Go Here / ?>
</body>
</html>
<?prg / Code Can Go Here / ?>
In mod harbour there are specified user-defined commands.

https://github.com/FiveTechSoft/mod_har ... e/exec.prg

__pp_addRule( hPP, "#xcommand TEMPLATE [ USING ] [ PARAMS [] [,] ] => " ;

__pp_addRule( hPP, "#command ENDTEMPLATE => #pragma __endtext" )

Continue the discussion