mirror of
https://github.com/AntKrotov/oberon-07-compiler.git
synced 2026-10-05 09:45:47 +00:00
мелкие правки
This commit is contained in:
1 parent
7694ded332
commit
d8c4975aed
6 files changed
+15
-28
No files matched your search
Binary file not shown.
@@ -2,9 +2,6 @@ lin64:
|
||||
./compiler ./source/Compiler.ob07 linux64exe -out ./bin/compiler -stk 2
|
||||
lin32:
|
||||
./compiler ./source/Compiler.ob07 linux32exe -out ./bin/compiler32 -stk 2
|
||||
lin.test:
|
||||
./compiler ./source/TESTING.ob07 linux32exe -out ./bin/testing -stk 2
|
||||
./bin/testing
|
||||
lin64sample1:
|
||||
./compiler ./samples/linux/hello.ob07 linux64exe -out ./bin/hello -stk 2
|
||||
./bin/hello
|
||||
@@ -15,5 +12,5 @@ win64:
|
||||
./compiler ./source/Compiler.ob07 win64con -out ./bin/Compiler.exe -stk 2
|
||||
win32:
|
||||
./compiler ./source/Compiler.ob07 win32con -out ./bin/Compiler32.exe -stk 2
|
||||
col:
|
||||
kos:
|
||||
./compiler ./source/Compiler.ob07 kosexe -out ./bin/Compiler.kex -stk 2
|
||||
@@ -26,10 +26,9 @@ Linux
|
||||
make # Собирает компилятор под Linux x64
|
||||
make lin64 # -//-
|
||||
make lin32 # Собирает компилятор под Linux x32
|
||||
make lin.test # Собирает и запускает тесты под Linux x64
|
||||
make lin64sample1 # Собирает и запускает пример-1 под Linux x64
|
||||
make lin64sample2 # Собирает и запускает пример-2 под Linux x64
|
||||
make win64 # Собирает компилятор под Windows x64
|
||||
make win32 # Собирает компилятор под Windows x32
|
||||
make col # Собирает компилятор под KolibriOS
|
||||
make kos # Собирает компилятор под KolibriOS
|
||||
```
|
||||
+11
-20
@@ -1,7 +1,7 @@
|
||||
(*
|
||||
BSD 2-Clause License
|
||||
|
||||
Copyright (c) 2018-2021, Anton Krotov
|
||||
Copyright (c) 2018-2022, Anton Krotov
|
||||
All rights reserved.
|
||||
*)
|
||||
|
||||
@@ -217,7 +217,6 @@ END opFloat2;
|
||||
PROCEDURE fconv* (s: ARRAY OF CHAR; VAR v: VALUE; VAR error: INTEGER);
|
||||
VAR
|
||||
value: REAL;
|
||||
frac: REAL;
|
||||
exp10: REAL;
|
||||
i, n, d: INTEGER;
|
||||
minus: BOOLEAN;
|
||||
@@ -225,32 +224,24 @@ VAR
|
||||
BEGIN
|
||||
error := 0;
|
||||
value := 0.0;
|
||||
frac := 0.0;
|
||||
exp10 := 1.0;
|
||||
minus := FALSE;
|
||||
n := 0;
|
||||
|
||||
i := 0;
|
||||
WHILE (error = 0) & STRINGS.digit(s[i]) DO
|
||||
IF opFloat2(value, 10.0, "*") & opFloat2(value, FLT(digit[ORD(s[i])]), "+") THEN
|
||||
exp10 := 0.0;
|
||||
WHILE (error = 0) & (STRINGS.digit(s[i]) OR (s[i] = ".")) DO
|
||||
IF s[i] = "." THEN
|
||||
exp10 := 1.0;
|
||||
INC(i)
|
||||
ELSE
|
||||
error := 4
|
||||
IF opFloat2(value, 10.0, "*") & opFloat2(value, FLT(digit[ORD(s[i])]), "+") & opFloat2(exp10, 10.0, "*") THEN
|
||||
INC(i)
|
||||
ELSE
|
||||
error := 4
|
||||
END
|
||||
END
|
||||
END;
|
||||
|
||||
INC(i);
|
||||
|
||||
WHILE (error = 0) & STRINGS.digit(s[i]) DO
|
||||
IF opFloat2(frac, 10.0, "*") & opFloat2(frac, FLT(digit[ORD(s[i])]), "+") THEN
|
||||
exp10 := exp10 * 10.0;
|
||||
INC(i)
|
||||
ELSE
|
||||
error := 4
|
||||
END
|
||||
END;
|
||||
|
||||
IF ~opFloat2(value, frac / exp10, "+") THEN
|
||||
IF ~opFloat2(value, exp10, "/") THEN
|
||||
error := 4
|
||||
END;
|
||||
|
||||
|
||||
+2
-2
@@ -23,8 +23,8 @@ CONST
|
||||
max32* = 2147483647;
|
||||
|
||||
vMajor* = 1;
|
||||
vMinor* = 57;
|
||||
Date* = "31-aug-2022";
|
||||
vMinor* = 58;
|
||||
Date* = "07-sep-2022";
|
||||
|
||||
FILE_EXT* = ".ob07";
|
||||
RTL_NAME* = "RTL";
|
||||
|
||||
Reference in new issue
Block a user