Основные антивирусы больше не реагируют на мнимые вирусы в программах, компилируепях PascalABC.NET.

Убрана функция ErrorStringFromResource
This commit is contained in:
Mikhalkovich Stanislav 2021-11-22 16:58:21 +03:00
parent 55d267f9a0
commit e124b9f832
8 changed files with 42 additions and 38 deletions

View file

@ -15,7 +15,7 @@ internal static class RevisionClass
public const string Major = "3";
public const string Minor = "8";
public const string Build = "2";
public const string Revision = "3027";
public const string Revision = "3032";
public const string MainVersion = Major + "." + Minor;
public const string FullVersion = Major + "." + Minor + "." + Build + "." + Revision;

View file

@ -1,4 +1,4 @@
%MINOR%=8
%REVISION%=3027
%COREVERSION%=2
%REVISION%=3032
%MINOR%=8
%MAJOR%=3

Binary file not shown.

View file

@ -117,8 +117,8 @@
<blockquote><code><strong>for var</strong> i:=0 <strong>to</strong> a.Length-1
<strong>do</strong><br>&nbsp; read(a[i]);</code></blockquote>
<p>Ââîä äèíàìè÷åñêîãî ìàññèâà ìîæíî îñóùåñòâëÿòü
ñ ïîìîùüþ ñòàíäàðòíîé ôóíêöèè ReadSeqInteger:</p>
<blockquote><code><strong>var</strong> a := ReadSeqInteger(10);</code></blockquote>
ñ ïîìîùüþ ñòàíäàðòíîé ôóíêöèè ReadArrInteger:</p>
<blockquote><code><strong>var</strong> a := ReadArrInteger(10);</code></blockquote>
<p>Ïðè ýòîì ïîä äèíàìè÷åñêèé ìàññèâ âûäåëÿåòñÿ ïàìÿòü íóæíîãî ðàçìåðà.</p>
<h2>Âûâîä äèíàìè÷åñêîãî ìàññèâà</h2>
<p>Ïðîöåäóðà write âûâîäèò äèíàìè÷åñêèé ìàññèâ, çàêëþ÷àÿ ýëåìåíòû â êâàäðàòíûå

View file

@ -1 +1 @@
3.8.2.3027
3.8.2.3032

View file

@ -1 +1 @@
!define VERSION '3.8.2.3027'
!define VERSION '3.8.2.3032'

View file

@ -14106,9 +14106,9 @@ begin
try
DefaultEncoding := Encoding.GetEncoding(1251);
if (System.Environment.OSVersion.Version.Major >= 6) and (System.Environment.OSVersion.Version.Minor >= 2) then
System.Console.OutputEncoding := Encoding.GetEncoding(1251);
System.Console.OutputEncoding := Encoding.UTF8;
except
DefaultEncoding := Encoding.UTF8;
//DefaultEncoding := Encoding.UTF8;
DefaultEncoding := new System.Text.UTF8Encoding(false)
end;
rnd := new System.Random;
@ -14139,7 +14139,7 @@ begin
System.Threading.Thread.CurrentThread.CurrentCulture := new System.Globalization.CultureInfo('en-US');
var defaultCulture := typeof(System.Globalization.CultureInfo).GetProperty('DefaultThreadCurrentCulture');
if defaultCulture <> nil then
defaultCulture.SetValue(nil, new System.Globalization.CultureInfo('en-US'));
defaultCulture.SetValue(nil, new System.Globalization.CultureInfo('en-US'), nil);
input := new TextFile();
output := new TextFile();
output.sw := Console.Out;

View file

@ -307,6 +307,10 @@ type
// -----------------------------------------------------
// IOSystem interface & IOStandardSystem implementation
// -----------------------------------------------------
// размер буфера. Определен эмпирически
const buflen = 256;
type
/// Интерфейс подсистемы ввода/вывода
IOSystem = interface
@ -338,7 +342,7 @@ type
IOStandardSystem = class(IOSystem)
state := 0; // 0 - нет символа в буфере char, 1 - есть символ в буфере char
sym: integer; // буфер в 1 символ для моделирования Peek в консоли
buf: array of char;
buf: array of char := new char[buflen];
pos := 0;
realbuflen := -1; // только вначале
tr: TextReader;
@ -2859,6 +2863,8 @@ const
MATR_DIMENSIONS_MUST_BE_EQUAL = 'Размеры матриц должны совпадать!!Matrix dimensions must be equal';
COUNT_PARAMS_MAXFUN_MUSTBE_GREATER1 = 'Количество параметров функции Max должно быть > 1!!The number of parameters of the Max function must be > 1';
COUNT_PARAMS_MINFUN_MUSTBE_GREATER1 = 'Количество параметров функции Min должно быть > 1!!The number of parameters of the Min function must be > 1';
Format_InvalidString = 'Входная строка имела неверный формат!!Input string was not in a correct format';
Overflow_Int32 = 'Целочисленное переполнение!!Integer overflow';
// -----------------------------------------------------
// WINAPI
// -----------------------------------------------------
@ -5279,16 +5285,15 @@ end;
// IOStandardSystem: implementation
// -----------------------------------------------------
// размер буфера. Определен эмпирически
const
buflen = 256;
constructor IOStandardSystem.Create;
begin
tr := Console.In;
buf := new char[buflen];
//buf := new char[buflen]; - теперь при объявлении поля
end;
const
m = char(-1);
procedure IOStandardSystem.ReadNextBuf;
begin
realbuflen := tr.ReadBlock(buf, 0, buflen);
@ -5297,8 +5302,6 @@ begin
pos := 0;
end;
const
m = char(-1);
var
_IsPipedRedirectedQuery := False;
@ -5524,11 +5527,12 @@ begin
end;
end;
function ErrorStringFromResource(s: string): string;
{function ErrorStringFromResource(s: string): string;
begin
var _rm := new System.Resources.ResourceManager('mscorlib', typeof(object).Assembly);
Result := _rm.GetString(s);
end;
//var _rm := new System.Resources.ResourceManager('mscorlib', typeof(object).Assembly);
//Result := _rm.GetString(s);
Result := GetTranslation(s);
end;}
procedure IOStandardSystem.read(var x: integer);
begin
@ -5557,7 +5561,7 @@ begin
raise new System.IO.IOException(GetTranslation(READ_LEXEM_AFTER_END_OF_INPUT_STREAM));
if (c < #48) or (c > #57) then
raise new System.FormatException(ErrorStringFromResource('Format_InvalidString') + ' ' + Ord(c));
raise new System.FormatException(GetTranslation(Format_InvalidString) + ' ' + Ord(c));
x := integer(c) - 48;
repeat
@ -5574,11 +5578,11 @@ begin
break;
if c > #57 then
raise new System.FormatException(ErrorStringFromResource('Format_InvalidString') + ' ' + Ord(c));
raise new System.FormatException(GetTranslation(Format_InvalidString) + ' ' + Ord(c));
if c < #48 then
raise new System.FormatException(ErrorStringFromResource('Format_InvalidString') + ' ' + Ord(c));
raise new System.FormatException(GetTranslation(Format_InvalidString) + ' ' + Ord(c));
if x > 214748364 then
raise new System.OverflowException(ErrorStringFromResource('Overflow_Int32'));
raise new System.OverflowException(GetTranslation(Overflow_Int32));
x := x * 10 + (integer(c) - 48);
pos += 1;
@ -5587,7 +5591,7 @@ begin
if x < 0 then
if (x = -2147483648) and (sign = -1) then
exit
else raise new System.OverflowException(ErrorStringFromResource('Overflow_Int32'));
else raise new System.OverflowException(GetTranslation(Overflow_Int32));
if sign = -1 then
x := -x;
end
@ -9041,7 +9045,7 @@ begin
while (j <= s.Length) and char.IsWhiteSpace(s[j]) do
j += 1;
if (j > s.Length) then
raise new System.FormatException(ErrorStringFromResource('Format_InvalidString'));
raise new System.FormatException(GetTranslation(Format_InvalidString));
var sign := 0;
if s[j] = '-' then
begin
@ -9054,10 +9058,10 @@ begin
j += 1;
end;
if (j > s.Length) then
raise new System.FormatException(ErrorStringFromResource('Format_InvalidString'));
raise new System.FormatException(GetTranslation(Format_InvalidString));
var c := integer(s[j]);
if (c < 48) or (c > 57) then
raise new System.FormatException(ErrorStringFromResource('Format_InvalidString'));
raise new System.FormatException(GetTranslation(Format_InvalidString));
Result := c - 48;
j += 1;
while j <= s.Length do
@ -9068,20 +9072,20 @@ begin
if c < 48 then
break;
if Result > 214748364 then
raise new System.OverflowException(ErrorStringFromResource('Overflow_Int32'));
raise new System.OverflowException(GetTranslation(Overflow_Int32));
Result := Result * 10 + (c - 48);
j += 1;
end;
if Result < 0 then
if (Result = -2147483648) and (sign = -1) then
exit
else raise new System.OverflowException(ErrorStringFromResource('Overflow_Int32'));
else raise new System.OverflowException(GetTranslation(Overflow_Int32));
if sign = -1 then
Result := -Result;
while (j <= s.Length) and char.IsWhiteSpace(s[j]) do
j += 1;
if j <= s.Length then
raise new System.FormatException(ErrorStringFromResource('Format_InvalidString'));
raise new System.FormatException(GetTranslation(Format_InvalidString));
end;
function TryStrToInt(s: string; var value: integer): boolean;
@ -9170,7 +9174,7 @@ begin
while (from <= s.Length) and char.IsWhiteSpace(s[from]) do
from += 1;
if (from > s.Length) then
raise new System.FormatException(ErrorStringFromResource('Format_InvalidString'));
raise new System.FormatException(GetTranslation(Format_InvalidString));
var sign := 0;
if s[from] = '-' then
begin
@ -9183,10 +9187,10 @@ begin
from += 1;
end;
if (from > s.Length) then
raise new System.FormatException(ErrorStringFromResource('Format_InvalidString'));
raise new System.FormatException(GetTranslation(Format_InvalidString));
var c := integer(s[from]);
if (c < 48) or (c > 57) then
raise new System.FormatException(ErrorStringFromResource('Format_InvalidString'));
raise new System.FormatException(GetTranslation(Format_InvalidString));
Result := c - 48;
from += 1;
while from <= s.Length do
@ -9197,14 +9201,14 @@ begin
if c < 48 then
break;
if Result > 214748364 then
raise new System.OverflowException(ErrorStringFromResource('Overflow_Int32'));
raise new System.OverflowException(GetTranslation(Overflow_Int32));
Result := Result * 10 + (c - 48);
from += 1;
end;
if Result < 0 then
if (Result = -2147483648) and (sign = -1) then
exit
else raise new System.OverflowException(ErrorStringFromResource('Overflow_Int32'));
else raise new System.OverflowException(GetTranslation(Overflow_Int32));
if sign = -1 then
Result := -Result;
end;