WESCL to HTML-browser communication

To present the state of any WESCL-register on the HTML-page, a special &IOString(regname) has to be inserted in the p-HTML-file.

Before the WebEmbed sends a HTML-page to the browser, the wescl parsing machine analyzes the user-defined "p-HTML" file, searching for &IOString(regname) placeholders and replacing them with the current value of the indicated register.

The example below shows how to place the current state of M0 and B1 register in the p-HTML file:

Example 4-2. Reading WESCL variables

 <html>
   <body>
     <br>M0=&IOString(M0)
     <br>B1=&IOString(B1)
   </body>
 </html>
To see the result, put this code to abc.htm file and point browser to URL: http://webembed/wescl?V=abc.htm.

Note: Notice that there is a difference in appearance (on the browser screen) between the page http://webembed/wescl?V=abc.htm generated by the cgi-bin wescl, and the page http://webembed/abc.htm generated out of the plain p-HTML file (not processed by the cgi-bin wescl).

V register

V register specifies the visualization p-HTML file, which is to be processed and sent to the browser by the cgi-bin wescl.

Example 4-3. Using V register


 <html>
   <body>
     This is abc.html file.
   </body>
 </html>
To run the example, place the above code in abc.html file and point browser to URL: http://webembed/wescl?V=abc.html

Note: After WebEmbed reset, the default value of the V register is "default.htm".

E register

The special read-only E register contains current information about WESCL state, such as status or error description generated by the WESCL compiler.

Example 4-4. Using E register


 <html>
   <body>
     WESCL status: &IOString(E).
   </body>
 </html>
To run the example, place the above code in status.html file and point browser to URL: http://webembed/wescl?V=status.html

Note: If everything is ok, the default value of E register is "Working".

Contents of the E registerDescription
WorkingEverything is ok.
ERROR: can not open /home/auto.scl file.The auto.scl file doesn't exists.
ERROR: while reading /home/auto.scl file.Read error.
ERROR: file /home/auto.scl is too large (>=8192 bytes).Internal limit exceeded.
ERROR: Invalid Token ErrorSource-code error
ERROR: Syntax ErrorSource-code error
ERROR: Use simplier construction at line(...) Too complicated expression (too many parentheses).
ERROR: Out of memory. Program too long.Internal limit exceeded.