hola de vuelta,
y no estarás compilando en un directorio diferente al que estás ejecutando ?
el siguiente programa, esencilamente igual al tuyo, hace lo esperable:
program p;
var oct: integer;
begin
readln (oct);
if (oct > 100) and (oct <= 999)
then writeln ('THEN')
else writeln ('ELSE')
end.
EJECUCIONES:
luis@bercho:~/git/Cuaderno/programacion/Notas/txt$ ./p
12
ELSE
luis@bercho:~/git/Cuaderno/programacion/Notas/txt$ ./p
123
THEN
luis@bercho:~/git/Cuaderno/programacion/Notas/txt$ ./p
1234
ELSE
luis@bercho:~/git/Cuaderno/programacion/Notas/txt$
saludos
luis