# HG changeset patch # User unc0rr # Date 1538766567 -7200 # Node ID 885ee14fe640dab3426ce012611543aba74b010e # Parent bc90a932a4b332d0e9d5d8f7181d013ccc423c0a Fix previous patch, add support for High(Longword) diff -r bc90a932a4b3 -r 885ee14fe640 tools/pas2c/Pas2C.hs --- a/tools/pas2c/Pas2C.hs Fri Oct 05 21:04:01 2018 +0200 +++ b/tools/pas2c/Pas2C.hs Fri Oct 05 21:09:27 2018 +0200 @@ -705,7 +705,8 @@ (BTArray i _ _) -> initExpr2C' $ BuiltInFunction "pred" [InitRange i] BTInt _ -> case e' of (Identifier "LongInt" _) -> return $ int (2147483647) - _ -> error $ "BuiltInFunction 'high' in initExpr: " ++ show e' + (Identifier "LongWord" _) -> return $ text "4294967295" + _ -> error $ "BuiltInFunction 'high' in initExpr: " ++ show e' a -> error $ "BuiltInFunction 'high' in initExpr: " ++ show a ++ ": " ++ show hi initExpr2C' (BuiltInFunction "succ" [BuiltInFunction "pred" [e]]) = initExpr2C' e initExpr2C' (BuiltInFunction "pred" [BuiltInFunction "succ" [e]]) = initExpr2C' e