toto.ve2cuy.com, sérieux?
Si tu es rendu ici, c'est que tu es sérieusement perdu
If you landed here, you are seriously lost
Go play somewhere else 🎶
- NOT REALLY 😉
Back to main site
Running PC-DOS 2.10 on an IBM 5160 - cgi script written in Turbo Pascal
As a reminder:
program WriteCGI;
var
i : Integer; { This is a comment ;-) }
HTML : String;
begin
Write('Type HTML code: ');
ReadLn(HTML);
for i := 1 to 10 do
begin
WriteLn('<br>Hello ', HTML)
end;
readln;
end.
One more ;-)
program CaMeLcAsE;
var
text, cc: string[100];
c: char;
i: integer;
lastSpace: boolean;
upper, lower: set of char;
begin
upper := ['A'..'Z'];
lower := ['a'..'z'];
readln(text);
lastSpace := true;
cc := '';
for i := 1 to Length(text) do
begin
c := text[i];
if (c in lower) or (c in upper) then
begin
if (lastSpace) then { convert to uppercase }
begin
if (c in lower) then
c := chr(ord(c) - 32);
end
else { convert to lowercase }
if (c in upper) then
c := chr(ord(c) + 32);
cc := cc + c;
lastSpace := false;
end
else
lastSpace := true;
end;
writeln(cc);
end.
All rights reserved VE2CUY - ©️ 1959-1985