fix in read

This commit is contained in:
Ivan Bondarev 2024-04-14 11:10:22 +02:00
parent 73d0f3528a
commit c00a0f2c85
3 changed files with 10 additions and 2 deletions

7
TestSuite/read1.pas Normal file
View file

@ -0,0 +1,7 @@
var
read: integer;
begin
assign(input, 'read1.txt');
readln(read);
assert(read = 45);
end.

1
TestSuite/read1.txt Normal file
View file

@ -0,0 +1 @@
45

View file

@ -557,8 +557,8 @@ namespace PascalABCCompiler.TreeConverter
{
if (!from_pabc_dll)
{
SystemLibrary.SystemLibInitializer.read_procedure = new SystemLibrary.UnitDefinitionItem(unit, compiler_string_consts.read_procedure_name);
SystemLibrary.SystemLibInitializer.readln_procedure = new SystemLibrary.UnitDefinitionItem(unit, compiler_string_consts.readln_procedure_name);
//SystemLibrary.SystemLibInitializer.read_procedure = new SystemLibrary.UnitDefinitionItem(unit, compiler_string_consts.read_procedure_name);
//SystemLibrary.SystemLibInitializer.readln_procedure = new SystemLibrary.UnitDefinitionItem(unit, compiler_string_consts.readln_procedure_name);
}
else
{