Oleg-N-Cher / OfrontPlus

Oberon family of languages to C translator for ARM, x64 and x86 architectures
Other
57 stars 11 forks source link

MIN/MAX with two arguments in Component Pascal and Oberon-3 #94

Closed Oleg-N-Cher closed 4 years ago

Oleg-N-Cher commented 4 years ago

Component Pascal Language Report

MAX(x, y)   <= INTEGER  INTEGER the larger value of x and y
    integer type    LONGINT
    <= SHORTREAL    SHORTREAL
    numeric type    REAL
    SHORTCHAR   SHORTCHAR
    character type  CHAR
MIN(x, y)   <= INTEGER  INTEGER the smaller of x and y
    integer type    LONGINT
    <= SHORTREAL    SHORTREAL
    numeric type    REAL
    SHORTCHAR   SHORTCHAR
    character type  CHAR

Also I've used the fix suggested by Anton Dmitriev (adimetrius). Thank Anton!