hedgewars/pas2cSystem.pas
author lovelacer
Tue, 17 Jan 2012 09:01:31 -0500
changeset 6580 6155187bf599
parent 6552 91adc9ee7b8c
child 6635 c2fa29fe2a58
permissions -rw-r--r--
A partial reformatting of the pascal code to have consistent syntax. Things that are still inconsistent. Some switch statements (uVisualGears.pas) are not lined up on the : so the internal code blocks are not aligned (lined up on the start of the label instead). Some function contents are indented against begin/end of function, some are not, some function begin/end are themselves indented (adler32). Also inconsistency in things like assigning of variables (whitespace before :=) and use of brackets in tests. Probably needs further review for possible code errors.

system;

type 
    LongInt = integer;
    LongWord = integer;
    Cardinal = integer;
    PtrInt = integer;
    Word = integer;
    Integer = integer;
    Byte = integer;
    SmallInt = integer;
    ShortInt = integer;

    pointer = pointer;
    PChar = pointer;

    double = float;
    real = float;
    float = float;

    boolean = boolean;
    LongBool = boolean;

    string = string;
    shortstring = string;
    ansistring = string;

    char = char;
    
    PByte = ^Byte;
    PLongInt = ^LongInt;
    PLongWord = ^LongWord;
    PInteger = ^Integer;
var 
    false, true: boolean;
    write, writeLn, read, readLn, inc, dec: procedure;
    StrLen, ord, Succ, Pred : function : integer;
    Low, High : function : integer;
    Now : function : integer;
    StrPas, FormatDateTime : function : shortstring;
    exit : procedure;