PROGRAM TemperatureConversion(Output);
    {
        Program 3.1- Example program illustrating constant
        and type definitions and variable declaration parts.
    }

    CONST
        Bias = 32;
        Factor = 1.8;
        Low = -20;
        High = 39;
        Seperator = '   ---';
        Blanks = '    ';
    TYPE
        CelciusRange = Low..High;   { a subrange type - see chapter 5 }
    VAR
        Degree: CelciusRange;
BEGIN
    FOR Degree := Low TO High DO
    BEGIN
        Write(Output, Degree : 3, ' C', Seperator);
        Write(Output, Round(Degree*Factor + Bias) : 3, ' F');
        IF Odd(Degree) THEN
            WriteLn(Output)
        ELSE
            Write(Output, Blanks);
    END;
END.
