Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/pascalabcnet/pascalabcnet
Browse files Browse the repository at this point in the history
…into test
  • Loading branch information
BH_build_bot authored and BH_build_bot committed Feb 5, 2024
2 parents 72dd446 + 630e682 commit 291322a
Show file tree
Hide file tree
Showing 22 changed files with 306 additions and 15 deletions.
2 changes: 2 additions & 0 deletions CodeCompletion/Testing.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1148,6 +1148,8 @@ public static void Test()
if (Text.Replace("\r\n","\n") != Text2.Replace("\r\n","\n"))
{
int line = 1;
Text = Text.Replace("\r\n", "\n");
Text2 = Text2.Replace("\r\n", "\n");
for (int i = 0; i < Math.Min(Text.Length, Text2.Length); i++)
{
if (Text[i] != Text2[i])
Expand Down
2 changes: 1 addition & 1 deletion Configuration/GlobalAssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ internal static class RevisionClass
public const string Major = "3";
public const string Minor = "9";
public const string Build = "0";
public const string Revision = "3419";
public const string Revision = "3421";

public const string MainVersion = Major + "." + Minor;
public const string FullVersion = Major + "." + Minor + "." + Build + "." + Revision;
Expand Down
2 changes: 1 addition & 1 deletion Configuration/Version.defs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
%MINOR%=9
%REVISION%=3419
%REVISION%=3421
%COREVERSION%=0
%MAJOR%=3
1 change: 1 addition & 0 deletions PABCNetHelp/CreateHelp.bat
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ cd DocGenForStandardUnits
!GenDocGraphWPF.exe
!GenDocWPFObjects.exe
!GenDocGraph3D.exe
!GenDocCRT.exe
cd ..
"C:\Program Files (x86)\HTML Help Workshop\hhc.exe" PascalABCNETNew.hhp
copy PascalABCNET.chm ..\bin\PascalABCNET.chm
Expand Down
Binary file added PABCNetHelp/DocGenForStandardUnits/!GenDocCRT.exe
Binary file not shown.
12 changes: 12 additions & 0 deletions PABCNetHelp/DocGenForStandardUnits/!GenDocCRT.pas
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
uses GenDocUnit;

begin
fname := '..\..\bin\Lib\CRT.pas';
RootOutputDirectory := 'PABCUnits\CRT\';
Step1;
Step2;
Step3;
Step3_1;
Step4;
FinalStep;
end.
Binary file modified PABCNetHelp/DocGenForStandardUnits/!GenDocGraphWPF.exe
Binary file not shown.
23 changes: 19 additions & 4 deletions PABCNetHelp/DocGenForStandardUnits/GenDocUnit.pas
Original file line number Diff line number Diff line change
Expand Up @@ -92,20 +92,35 @@ procedure Step2;
WriteLines('__PABC1.pas',l);
end;

function ClearParam(s: string): string;
begin
var ind := Pos('<param',s);
var ind2 := Pos('</param>',s,ind + 1);
if (ind > 0) and (ind2 > 0) then
s := '///';
Result := s;
end;

procedure Step3;
const fname = '__PABC1.pas';
begin
var l := new List<string>;
var Prev: string := '';
foreach var s in ReadLines(fname) do
begin
if Prev.StartsWith('/// ') and s.StartsWith('///') and not s.StartsWith('///-') then
// Если есть summary, то взять только внутренность
var s1 := s.Replace('<summary>','').Replace('</summary>','');
// Если есть <param, то выбросить всю внутренность
s1 := ClearParam(s1);

if Prev.StartsWith('/// ') and s1.StartsWith('///') and not s1.StartsWith('///-') then
begin
l[l.Count-1] := l[l.Count-1] + '' + s.Remove(0,3).Trim;
l[l.Count-1] := l[l.Count-1] + '' + s1.Remove(0,3).Trim;
end
else l.Add(s);
Prev := s;
else l.Add(s1);
Prev := s1;
end;
l := l.Where(s -> s <> '///').ToList;

WriteLines('__PABC1-1.pas',l);
end;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@
<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Âîçâðàùàåò ïîñëåäîâàòåëüíîñòü ñèìâîëîâ îò c1 äî c2</td></tr>
<tr><td><code><b>function</b> Range(c1, c2: char; step: integer): <b>sequence </b> <b>of</b> char;</code>
<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Âîçâðàùàåò ïîñëåäîâàòåëüíîñòü ñèìâîëîâ îò c1 äî c2 ñ øàãîì step</td></tr>
<tr><td><code><b>function</b> Range(a, b, step: real): <b>sequence </b> <b>of</b> real;</code>
<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Âîçâðàùàåò ïîñëåäîâàòåëüíîñòü âåùåñòâåííûõ îò a äî b ñ øàãîì step</td></tr>
<tr><td><code><b>function</b> ReadSeqInteger(n: integer): <b>sequence </b> <b>of</b> integer;</code>
<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Âîçâðàùàåò ïîñëåäîâàòåëüíîñòü èç n öåëûõ, ââåäåííûõ ñ êëàâèàòóðû</td></tr>
<tr><td><code><b>function</b> ReadSeqInteger(prompt: string; n: integer): <b>sequence </b> <b>of</b> integer;</code>
Expand Down
53 changes: 53 additions & 0 deletions PABCNetHelp/PABCUnits/CRT/Files/CRT constants.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
<HTML><HEAD><object type="application/x-oleobject" classid="clsid:1e2a7bd0-dab9-11d0-b93a-00c04fc99f9e">
<param name="Keyword" value="Black">
<param name="Keyword" value="Blue">
<param name="Keyword" value="Brown">
<param name="Keyword" value="Cyan">
<param name="Keyword" value="DarkGray">
<param name="Keyword" value="Green">
<param name="Keyword" value="LightBlue">
<param name="Keyword" value="LightCyan">
<param name="Keyword" value="LightGray">
<param name="Keyword" value="LightGreen">
<param name="Keyword" value="LightMagenta">
<param name="Keyword" value="LightRed">
<param name="Keyword" value="Magenta">
<param name="Keyword" value="Red">
<param name="Keyword" value="White">
<param name="Keyword" value="Yellow"></object>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1251"><link rel="StyleSheet" href="../../../default.css">
</HEAD><body><H1>Öâåòîâûå êîíñòàíòû ìîäóëÿ CRT</H1>
<table border=0 cellpadding=5><tr><td><code>Black = 0;</code>
<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;×åðíûé öâåò</td></tr>
<tr><td><code>Blue = 1;</code>
<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Ñèíèé öâåò</td></tr>
<tr><td><code>Brown = 6;</code>
<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Êîðè÷íåâûé öâåò</td></tr>
<tr><td><code>Cyan = 3;</code>
<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Áèðþçîâûé öâåò</td></tr>
<tr><td><code>DarkGray = 8;</code>
<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Òåìíî-ñåðûé öâåò</td></tr>
<tr><td><code>Green = 2;</code>
<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Çåëåíûé öâåò</td></tr>
<tr><td><code>LightBlue = 9;</code>
<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Ñâåòëî-ãîëóáîé öâåò</td></tr>
<tr><td><code>LightCyan = 11;</code>
<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Ñâåòëî-áèðþçîâûé öâåò</td></tr>
<tr><td><code>LightGray = 7;</code>
<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Ñâåòëî-ñåðûé öâåò</td></tr>
<tr><td><code>LightGreen = 10;</code>
<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Ñâåòëî-çåëåíûé öâåò</td></tr>
<tr><td><code>LightMagenta = 13;</code>
<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Ñâåòëî-ìàëèíîâûé öâåò</td></tr>
<tr><td><code>LightRed = 12;</code>
<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;öâåò</td></tr>
<tr><td><code>Magenta = 5;</code>
<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Ìàëèíîâûé öâåò</td></tr>
<tr><td><code>Red = 4;</code>
<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Êðàñíûé öâåò</td></tr>
<tr><td><code>White = 15;</code>
<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Áåëûé öâåò</td></tr>
<tr><td><code>Yellow = 14;</code>
<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Æåëòûé öâåò</td></tr>
</table>
</body></HTML>
56 changes: 56 additions & 0 deletions PABCNetHelp/PABCUnits/CRT/Files/CRT functions.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
<HTML><HEAD><object type="application/x-oleobject" classid="clsid:1e2a7bd0-dab9-11d0-b93a-00c04fc99f9e">
<param name="Keyword" value="ClearLine">
<param name="Keyword" value="ClrScr">
<param name="Keyword" value="Delay">
<param name="Keyword" value="GotoXY">
<param name="Keyword" value="HideCursor">
<param name="Keyword" value="KeyPressed">
<param name="Keyword" value="ReadKey">
<param name="Keyword" value="SetWindowCaption">
<param name="Keyword" value="SetWindowSize">
<param name="Keyword" value="SetWindowTitle">
<param name="Keyword" value="ShowCursor">
<param name="Keyword" value="TextBackground">
<param name="Keyword" value="TextColor">
<param name="Keyword" value="WhereX">
<param name="Keyword" value="WhereY">
<param name="Keyword" value="WindowHeight">
<param name="Keyword" value="WindowWidth"></object>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1251"><link rel="StyleSheet" href="../../../default.css">
</HEAD><body><H1>Ïîäïðîãðàììû ìîäóëÿ CRT</H1>
<table border=0 cellpadding=5><tr><td><code><b>procedure</b> ClearLine;</code>
<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Î÷èùàåò ëèíèþ íà êîòîðîé óñòàíîâëåí êóðñîð</td></tr>
<tr><td><code><b>procedure</b> ClrScr;</code>
<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Î÷èùàåò ýêðàí, çàïîëíÿÿ åãî òåêóùèì öâåòîì ôîíà</td></tr>
<tr><td><code><b>procedure</b> Delay(ms: integer);</code>
<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Äåëàåò ïàóçó íà ms ìèëëèñåêóíä</td></tr>
<tr><td><code><b>procedure</b> GotoXY(x, y: integer);</code>
<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Ïåðåâîäèò êóðñîð â êîîðäèíàòû (x,y)</td></tr>
<tr><td><code><b>procedure</b> HideCursor;</code>
<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Ñêðûâàåò êóðñîð</td></tr>
<tr><td><code><b>function</b> KeyPressed: boolean;</code>
<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Âîçâðàùàåò true åñëè áûëà íàæàòà êëàâèøà. Ñ÷èòàòü ñèìâîë ìîæíî ñïîìîùüþ ôóíêöèè ReadKey</td></tr>
<tr><td><code><b>function</b> ReadKey: char;</code>
<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Ñ÷èòûâàò íàæàòóþ êëàâèøó</td></tr>
<tr><td><code><b>procedure</b> SetWindowCaption(s: string);</code>
<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Çàäàåò çàãîëîâîê êîíñîëüíîãî îêíà</td></tr>
<tr><td><code><b>procedure</b> SetWindowSize(w, h: integer);</code>
<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Çàäàåò ðàçìåðû êîíñîëüíîãî îêíà</td></tr>
<tr><td><code><b>procedure</b> SetWindowTitle(s: string);</code>
<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Çàäàåò çàãîëîâîê êîíñîëüíîãî îêíà</td></tr>
<tr><td><code><b>procedure</b> ShowCursor;</code>
<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Ïîêàçûâàåò êóðñîð åñëè îí ñêðûò</td></tr>
<tr><td><code><b>procedure</b> TextBackground(c: integer);</code>
<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Çàäàåò öâåò ôîíà âûâîäèìîãî òåêñòà</td></tr>
<tr><td><code><b>procedure</b> TextColor(c: integer);</code>
<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Çàäàåò öâåò âûâîäèìîãî òåêñòà</td></tr>
<tr><td><code><b>function</b> WhereX: integer;</code>
<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Âîçâðàùàåò Õ-êîîðäèíàòó êóðñîðà</td></tr>
<tr><td><code><b>function</b> WhereY: integer;</code>
<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Âîçâðàùàåò Y-êîîðäèíàòó êóðñîðà</td></tr>
<tr><td><code><b>function</b> WindowHeight: integer;</code>
<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Âîçâðàùàåò âûñîòó ýêðàíà</td></tr>
<tr><td><code><b>function</b> WindowWidth: integer;</code>
<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Âîçâðàùàåò øèðèíó ýêðàíà</td></tr>
</table>
</body></HTML>
23 changes: 23 additions & 0 deletions PABCNetHelp/PABCUnits/CRT/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
<html>

<head>
<object type="application/x-oleobject" classid="clsid:1e2a7bd0-dab9-11d0-b93a-00c04fc99f9e">
<param name="Keyword" value="GraphWPF">
</object>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1251">
<title></title>
<link rel="StyleSheet" href="../../default.css">
</head>

<body>
<H1>Модуль CRT: обзор</H1>
Модуль <code>CRT</code> предназначен для работы с консолью. Он содержит ряд процедур и функций
для изменеия цвета вывода в консольном режиме, для позиционирования курсора внутри консольного окна
и для изменения свойств консольного окна.
<ul>
<li><a href="Files\CRT constants.html">Цветовые константы модуля CRT</a></li>
<li><a href="Files\CRT functions.html">Процедуры и функции модуля CRT</a></li>
</ul>
<p>&nbsp;</p>
</body>
</html>
21 changes: 19 additions & 2 deletions PABCNetHelp/Table of Contents New.hhc
Original file line number Diff line number Diff line change
Expand Up @@ -1277,12 +1277,29 @@
<param name="Local" value="PABCUnits\Graph3D\Files\Graph3D functions for nearest points and objects.html">
</OBJECT>
</UL>
<LI> <OBJECT type="text/sitemap">
<param name="Name" value="&Igrave;&icirc;&auml;&oacute;&euml;&uuml; CRT">
</OBJECT>
<UL>
<LI> <OBJECT type="text/sitemap">
<param name="Name" value="&Igrave;&icirc;&auml;&oacute;&euml;&uuml; CRT: &icirc;&aacute;&ccedil;&icirc;&eth;">
<param name="Local" value="PABCUnits\CRT\index.html">
</OBJECT>
<LI> <OBJECT type="text/sitemap">
<param name="Name" value="CRT: &ouml;&acirc;&aring;&ograve;&icirc;&acirc;&ucirc;&aring; &ecirc;&icirc;&iacute;&ntilde;&ograve;&agrave;&iacute;&ograve;&ucirc;">
<param name="Local" value="PABCUnits\CRT\Files\CRT constants.html">
</OBJECT>
<LI> <OBJECT type="text/sitemap">
<param name="Name" value="CRT: &iuml;&eth;&icirc;&ouml;&aring;&auml;&oacute;&eth;&ucirc; &egrave; &ocirc;&oacute;&iacute;&ecirc;&ouml;&egrave;&egrave;">
<param name="Local" value="PABCUnits\CRT\Files\CRT functions.html">
</OBJECT>
</UL>
<LI> <OBJECT type="text/sitemap">
<param name="Name" value="&Igrave;&icirc;&auml;&oacute;&euml;&uuml; GraphABC">
</OBJECT>
<UL>
<LI> <OBJECT type="text/sitemap">
<param name="Name" value="GraphABC: &icirc;&aacute;&ccedil;&icirc;&eth;">
<param name="Name" value="&Igrave;&icirc;&auml;&oacute;&euml;&uuml; GraphABC: &icirc;&aacute;&ccedil;&icirc;&eth;">
<param name="Local" value="PABCUnits\GraphABC\index.html">
</OBJECT>
<LI> <OBJECT type="text/sitemap">
Expand Down Expand Up @@ -1383,7 +1400,7 @@
</OBJECT>
<UL>
<LI> <OBJECT type="text/sitemap">
<param name="Name" value="ABCObjects: &icirc;&aacute;&ccedil;&icirc;&eth;">
<param name="Name" value="&Igrave;&icirc;&auml;&oacute;&euml;&uuml; ABCObjects: &icirc;&aacute;&ccedil;&icirc;&eth;">
<param name="Local" value="PABCUnits\ABCObjects\index.html">
</OBJECT>
<LI> <OBJECT type="text/sitemap">
Expand Down
2 changes: 1 addition & 1 deletion Release/pabcversion.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
3.9.0.3419
3.9.0.3421
2 changes: 1 addition & 1 deletion ReleaseGenerators/PascalABCNET_version.nsh
Original file line number Diff line number Diff line change
@@ -1 +1 @@
!define VERSION '3.9.0.3419'
!define VERSION '3.9.0.3421'
34 changes: 32 additions & 2 deletions TestSuite/CompilationSamples/CRT.pas
Original file line number Diff line number Diff line change
Expand Up @@ -15,22 +15,51 @@ interface
System;

const
Black = 0;
//{{{doc: Начало секции 0 }}}
// -----------------------------------------------------
//>> Цветовые константы модуля CRT # CRT constants
// -----------------------------------------------------

/// Черный цвет
Black = 0;
/// Синий цвет
Blue = 1;
/// Зеленый цвет
Green = 2;
/// Бирюзовый цвет
Cyan = 3;
/// Красный цвет
Red = 4;
/// Малиновый цвет
Magenta = 5;
/// Коричневый цвет
Brown = 6;
/// Светло-серый цвет
LightGray = 7;
/// Темно-серый цвет
DarkGray = 8;
/// Светло-голубой цвет
LightBlue = 9;
/// Светло-зеленый цвет
LightGreen = 10;
/// Светло-бирюзовый цвет
LightCyan = 11;
/// цвет
LightRed = 12;
/// Светло-малиновый цвет
LightMagenta = 13;
/// Желтый цвет
Yellow = 14;
/// Белый цвет
White = 15;
//{{{--doc: Конец секции 0 }}}


//{{{doc: Начало секции 1 }}}

// -----------------------------------------------------
//>> Подпрограммы модуля CRT # CRT functions
// -----------------------------------------------------

/// <summary>
/// Задает заголовок консольного окна
Expand Down Expand Up @@ -65,7 +94,6 @@ function WindowWidth: integer;
/// <summary>
/// Возвращает высоту экрана
/// </summary>
/// <returns></returns>
function WindowHeight: integer;
/// <summary>
/// Возвращает Х-координату курсора
Expand Down Expand Up @@ -110,6 +138,8 @@ procedure ClearLine;
/// </summary>
procedure Delay(ms: integer);

//{{{--doc: Конец секции 1 }}}

///--
procedure __InitModule__;

Expand Down
1 change: 1 addition & 0 deletions TestSuite/CompilationSamples/NUnitABC.pas
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ procedure InitPABCSystem;
RepeatAttribute = NUnit.Framework.RepeatAttribute;
TestFixtureAttribute = NUnit.Framework.TestFixtureAttribute;
ValuesAttribute = NUnit.Framework.ValuesAttribute;
SequentialAttribute = NUnit.Framework.SequentialAttribute;

Assert = NUnit.Framework.Assert;
Assume = NUnit.Framework.Assume;
Expand Down
Loading

0 comments on commit 291322a

Please sign in to comment.