program demo(input,output); var http : string[10]; pathinfo : string[20]; querystring : string[80]; name : string[30]; age : string[10]; begin repeat prompt('HTTP> '); readln(http); if http = 'GET' then begin prompt('PATHINFO> '); readln(pathinfo); prompt('QUERYSTRING> '); readln(querystring); writeln(''); writeln('
PathInfo is ' + pathinfo + '
'); writeln('QueryString is ' + querystring + '
'); writeln(''); writeln('Lars Appel, May 2000'); writeln(''); end else if http = 'POST' then begin prompt('PATHINFO> '); readln(pathinfo); prompt('QUERYSTRING> '); readln(querystring); prompt('NAME> '); readln(name); prompt('AGE> '); readln(age); writeln(''); writeln('PathInfo is ' + pathinfo + '
'); writeln('QueryString is ' + querystring + '
'); writeln('Name is ' + name + '
'); writeln('Age is ' + Age + '
'); writeln('Lars Appel, May 2000'); writeln(''); end else if http = 'EXIT' then { ignore here and exit the loop } else begin writeln(''); writeln('Unsupported method ' + http + '
'); writeln(''); end until http = 'EXIT' end.