Skip to main content

Server Page Directives

This section covers the syntax of the server page and the specific directives provided

Multiline Comments

A multiline comment can consist of any piece of text between the start tag <%-- and the end tag --%>. The comment can cover multiple lines and since it is a comment in the server page it will not be transferred to the source code when that is compiled. Only white space (spaces and tab characters) may precede the begin comment tag on the same line, and only white space may follow the end comment tag on the same line.

Server Page Comment Blocks

These comment blocks are similar to the previous type, except that the contents are passed through to the resulting compiled SIMPOL source code file as source code statements. This is the method by which the embedded source code is extracted into the target program source file. Any text between the start tag <% and the end tag %> will be transferred as SIMPOL source code to the target source code file. As in the previous case, the start tag may only be preceded on the same line by white space and the end tag may only be followed on the same line by white space.


Include the content of a file when the server page is compiled. Example:

<%@	include = ".\folder\MyHTMLChunk.txt" %>


By default a line of HTML code in the server page file is converted into a line in the SIMPOL source code file after compilation. The HTML text is embedded in a SIMPOL string that is an argument to the output method of the cgicall object. It means that if we have a large server page file, after compilation, lots of output calls are generated. We can optimize this using the outputcall = chunk directive. It can be located at any line in the server page file. To reverse this behaviour we have to use the outputcall = line directive. For example:

<%@ outputcall = chunk %>
<%@ outputcall = line %>

SIMPOL Source Code in an HTML Argument Value

In a line of a server page that holds an HTML argument value in between double quotes, we can add a small piece of SIMPOL source code in between back tick (`) character marks. For example:

<A href="`sVar1`">Hello</A>

Typically it is used to embed a SIMPOL string variable. In this example, after compilation we will get something like this:

cgi.output("<A href=""" + sVar1 + """>Hello</A>" + "{0D}{0A}", 1)

So, we can see that the value of the HTML argument that the browser will receive is the value of the SIMPOL variable. It is also possible to embed short chunks of inline code.