diff --git a/lang/m2/libm2/RealConver.mod b/lang/m2/libm2/RealConver.mod index f3795a339..72a95c5ef 100644 --- a/lang/m2/libm2/RealConver.mod +++ b/lang/m2/libm2/RealConver.mod @@ -139,7 +139,7 @@ IMPLEMENTATION MODULE RealConversions; RETURN; END; str[ind1] := 'E'; INC(ind1); - DEC(pointpos); + IF r # 0.0D THEN DEC(pointpos); END; IF pointpos < 0 THEN pointpos := -pointpos; str[ind1] := '-'; diff --git a/lang/m2/libm2/Streams.def b/lang/m2/libm2/Streams.def index e61336723..423063a47 100644 --- a/lang/m2/libm2/Streams.def +++ b/lang/m2/libm2/Streams.def @@ -119,7 +119,7 @@ DEFINITION MODULE Streams; *) PROCEDURE WriteBytes(stream: Stream; - VAR bytes: ARRAY OF BYTE; + bytes: ARRAY OF BYTE; VAR result: StreamResult); (* writes bytes to the stream. No character translations occur. The number of bytes written is equal to the size of the parameter. diff --git a/lang/m2/libm2/Streams.mod b/lang/m2/libm2/Streams.mod index 5c20c91e4..6cd36d3e3 100644 --- a/lang/m2/libm2/Streams.mod +++ b/lang/m2/libm2/Streams.mod @@ -304,7 +304,7 @@ IMPLEMENTATION MODULE Streams; END; END WriteByte; - PROCEDURE WriteBytes(stream: Stream; VAR bytes: ARRAY OF BYTE; VAR result: StreamResult); + PROCEDURE WriteBytes(stream: Stream; bytes: ARRAY OF BYTE; VAR result: StreamResult); VAR i: CARDINAL; BEGIN FOR i := 0 TO HIGH(bytes) DO