Subject: | |
From: | |
Reply To: | |
Date: | Fri, 21 Apr 2000 13:23:00 -0700 |
Content-Type: | text/plain |
Parts/Attachments: |
|
|
Hi,
Oops...I tested my Pascal on the OpenMarket web server...Apache is
more picky, and it didn't work there. Here's a revised version
that works on both Apache and OM:
$standard_level 'os_features'$
$type_coercion 'representation'$
program car_messages (info, parm);
type
str32 = string [32];
str132 = string [132];
var
{Small variables...}
parm : shortint;
{Big variables...}
buf : str132;
info : str132;
Function ascii : shortint; intrinsic;
Procedure dateline; intrinsic;
Procedure print; intrinsic;
{**************************************************************}
function num32 (n : integer) : str32;
var
s : str32;
begin
setstrlen (s, ascii (n, 10, s));
num32 := s;
end {num32 proc};
{**************************************************************}
procedure spout (s : str132);
begin
s := s + #10; {#10 is ASCII linefeed, Unix new-line char}
print (s, - strlen (s), octal ('320'));
end {spout proc};
{**************************************************************}
begin
dateline (buf); {sets first 27 bytes of text}
setstrlen (buf, 27);
spout ('Content-type: text/html');
spout ('');
spout ('<HTML>');
spout ('<BODY>');
spout ('This is a test');
spout ('<BR>');
spout ('My PARM is ' + num32 (parm));
spout ('<BR>');
spout ('My INFO is "' + info + '"');
spout ('<BR>');
spout ('Today is: ' + buf);
spout ('</BODY>');
spout ('</HTML>');
end.
Stan Sieler [log in to unmask]
www.allegro.com/sieler/wanted/index.html www.allegro.com/sieler
|
|
|