Pascal: ASCII Character Sequence

program ex26;

var  i, j : integer;
        x : char;
begin
  for i := 32 to 122 do
    write (chr(i));
  for j:= ord(' ') to ord('z') do
    write (chr(j));
  writeln();
  readln (x);
end.

The techniques here are fairly simple. ord() returns an integer which is the position of an element in an ordered set. The ANSI character set is one example of an ordered set. 

Back to questions