diff --git a/InstallerSamples/WhatsNew/3_11_1/ArrInInterpolated.pas b/InstallerSamples/WhatsNew/3_11_1/ArrInInterpolated.pas new file mode 100644 index 000000000..aeee8b6a2 --- /dev/null +++ b/InstallerSamples/WhatsNew/3_11_1/ArrInInterpolated.pas @@ -0,0 +1,8 @@ +// 3.11.1. В интерполированных строках теперь интерполируется содержимое контейнеров +begin + Println($'{[1,2,3]}'); + Println($'{Lst(1,2,3)}'); + Println($'{Lst([1,2],[3,4])}'); + Println($'{SetOf(1,2,3)}'); + Println($'{Dict(1 to 2, 3 to 4)}'); +end. \ No newline at end of file diff --git a/InstallerSamples/WhatsNew/3_11_1/ArrMatrRandomDiap.pas b/InstallerSamples/WhatsNew/3_11_1/ArrMatrRandomDiap.pas new file mode 100644 index 000000000..6df28846b --- /dev/null +++ b/InstallerSamples/WhatsNew/3_11_1/ArrMatrRandomDiap.pas @@ -0,0 +1,7 @@ +// 3.11.1. ArrRandomInteger и MatrRandomInteger с диапазоном +begin + var a := ArrRandomInteger(10,5..10); + a.Println; + var m := MatrRandomInteger(3,4,2..9); + m.Println(3); +end. \ No newline at end of file diff --git a/InstallerSamples/WhatsNew/3_11_1/ArrRealToStringDigits.pas b/InstallerSamples/WhatsNew/3_11_1/ArrRealToStringDigits.pas new file mode 100644 index 000000000..76e97d8ab --- /dev/null +++ b/InstallerSamples/WhatsNew/3_11_1/ArrRealToStringDigits.pas @@ -0,0 +1,6 @@ +// 3.11.1. ToString(digits) для массива вещественных +begin + var a := ArrRandomReal(5); + var s := a.ToString(1); + Print(s); +end. \ No newline at end of file diff --git a/InstallerSamples/WhatsNew/3_11_1/CopyMethod.pas b/InstallerSamples/WhatsNew/3_11_1/CopyMethod.pas new file mode 100644 index 000000000..55f7dc505 --- /dev/null +++ b/InstallerSamples/WhatsNew/3_11_1/CopyMethod.pas @@ -0,0 +1,9 @@ +// 3.11.1. ToString(digits) для массива вещественных +begin + var a := [1,3,5]; + var a1 := a.Copy; + Println(a1); + var m := Matr([2,4,6],[3,5,8]); + var m1 := m.Copy; + Println(m1); +end. \ No newline at end of file diff --git a/InstallerSamples/WhatsNew/3_11_1/GCD_LCM.pas b/InstallerSamples/WhatsNew/3_11_1/GCD_LCM.pas new file mode 100644 index 000000000..782d453c5 --- /dev/null +++ b/InstallerSamples/WhatsNew/3_11_1/GCD_LCM.pas @@ -0,0 +1,10 @@ +// 3.11.1. Стандартные функцции GCD, LCM +begin + var (a,b) := (56,98); + + var GCD := GCD(a, b); + var LCM := LCM(a, b); + + Println($'НОД({a}, {b}) = {GCD}'); + Println($'НОК({a}, {b}) = {LCM}'); +end. \ No newline at end of file diff --git a/InstallerSamples/WhatsNew/3_11_1/Hypot.pas b/InstallerSamples/WhatsNew/3_11_1/Hypot.pas new file mode 100644 index 000000000..09498f37f --- /dev/null +++ b/InstallerSamples/WhatsNew/3_11_1/Hypot.pas @@ -0,0 +1,5 @@ +// 3.11.1. Стандартная функция Hypot +begin + Hypot(3,4).Println; + Hypot(6,5).Println; +end. \ No newline at end of file diff --git a/InstallerSamples/WhatsNew/3_11_1/MatrixElements.pas b/InstallerSamples/WhatsNew/3_11_1/MatrixElements.pas new file mode 100644 index 000000000..c92418f7e --- /dev/null +++ b/InstallerSamples/WhatsNew/3_11_1/MatrixElements.pas @@ -0,0 +1,7 @@ +// 3.11.1. Метод Elements для матрицы - элементы по строкам +begin + var m := MatrRandomInteger(3,4); + m.Println; + m.Elements.Println; + Println(m.Elements.Min,m.Elements.Max,m.Elements.Sum); +end. \ No newline at end of file