pspc - Pascal Server Pages Interpreter
pspc <filename1> [filename2] [...]
PSPC compiles the *.psp documents and prints in the Standard Output (STDOUT) the returned data of the compilation.
/etc/pspc.conf or /usr/bin/pspc.conf
/usr/bin/pspc
The environment variables are specifieds by the HTTP server.
The more simple example is this
------- Begin Code -------
#!/usr/bin/pspc
<%
begin
//Simply returns this string
Result := 'Hello World!';
end;
%>
------- End Code -------
To run PSP documents under Linux by typiying ./program.psp or under the Apache http server (in Win32 or Linux) you need to add the header to especify the interpreter. The header is the first line of the program with the format "!#/path/to/pspc/binary".
If you need to use variables in the document you need to add the section var in the portion of code in where you needs.
Example:
------- Begin Code -------
#!/usr/bin/pspc
<%
var
//Variable to use
FNumber : integer;
begin
FNumber := sqrt(10);
Result := FNumber;
end;
%>
This program is normally executed via web server, but if you want to test it you can run *.psp documents simply writting "./document.psp" (if the document have a header) or "/usr/bin/pspc document.psp" or "pspc document.psp".
Jose Antonio Coret <joseanpiti@hotmail.com> <josean@es.gnu.org>
pspc_conf(5)