Iterating over the alphabet (or other contiguous ASCII range)
A simple way is to set up 2Iterate over the string variables, and then do a for loop e.g.
var a,c:string;begin
a:='abcdefghijklmnopqrstuvwxyz';for c in a do writeln(c);
But this is more efficient:
var c:char;begin
for c in'abcdefghijklmnopqrstuvwxyz'do writeln(c);
Or even better, use an ASCII range (uppercase alphabet)
var j:word;begin
for j:=65to 90do writeln(chr(j));
BUT! Here's the most compact approach, for 50 bytes:
var j:char;begin for j:=#65to#90do writeln(j)end.