This commit is contained in:
Ivan Bondarev 2021-12-14 20:42:46 +01:00
commit 304df19fc1
8 changed files with 25 additions and 10 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 = "3035";
public const string Revision = "3038";
public const string MainVersion = Major + "." + Minor;
public const string FullVersion = Major + "." + Minor + "." + Build + "." + Revision;

View file

@ -1,4 +1,4 @@
%MINOR%=8
%REVISION%=3035
%COREVERSION%=2
%REVISION%=3038
%MINOR%=8
%MAJOR%=3

View file

@ -1 +1 @@
3.8.2.3035
3.8.2.3038

View file

@ -1 +1 @@
!define VERSION '3.8.2.3035'
!define VERSION '3.8.2.3038'

View file

@ -637,7 +637,20 @@ type
static function operator in(x: integer; r: IntRange): boolean := (x >= r.l) and (x <= r.h);
static function operator in(x: real; r: IntRange): boolean := (x >= r.l) and (x <= r.h);
static function operator=(r1,r2: IntRange): boolean := (r1.l = r2.l) and (r1.h = r2.h);
static function operator=(r1,r2: IntRange): boolean;
begin
var o1: object := r1;
var o2: object := r2;
if (o1 = nil) and (o2 = nil) then
Result := true
else if (o1 <> nil) and (o2 = nil) then
Result := false
else if (o1 = nil) and (o2 <> nil) then
Result := false
else
Result := (r1.l = r2.l) and (r1.h = r2.h);
end;
/// Возвращает True если диапазон пуст
function IsEmpty: boolean := l>h;

View file

@ -10988,7 +10988,7 @@ begin
end;
end;
/// Есть ли элемент в матрице
/// Равны ли матрицы
function MatrEqual<T>(Self,b: array[,] of T): boolean; extensionmethod := MatrEqual(Self,b);
/// Вывод двумерного массива, w - ширина поля вывода

View file

@ -60,7 +60,6 @@ namespace PascalABCCompiler
switch (FileOperation)
{
case SourceFileOperation.GetText:
if (SourceFiles.ContainsKey(fn))
return SourceFiles[fn].Text;
string text = getFileText(FileName);
@ -102,7 +101,7 @@ namespace PascalABCCompiler
string arg = null;
ReadCommand(out command, out arg);
if (command == 182)
if (command == 182) // Error
return null;
int length = Convert.ToInt32(arg);
return readStringFromConsole(length);

View file

@ -158,7 +158,10 @@ namespace PascalABCCompiler
return 2;
}
var n1 = args.TakeWhile(a => a[0] == '/').Count(); // количество директив
// /W/a.pas расценивается как директива. Нужен более сложный паттерн: начинается с \буквы:
//var n1 = args.TakeWhile(a => a[0] == '/').Count(); // количество директив
// Поменяем: SSM 14/12/21
var n1 = args.TakeWhile(a => System.Text.RegularExpressions.Regex.IsMatch(a, @"^/\w+:")).Count(); // количество директив
if (n1<n-2)
{