Graph3D - анимация клонов
PT4 - Print(c)
This commit is contained in:
miks1965 2017-12-14 12:42:19 +03:00
parent 4b8e9b297b
commit 15429f1061
12 changed files with 1061 additions and 736 deletions

View file

@ -15,7 +15,7 @@ internal static class RevisionClass
public const string Major = "3"; public const string Major = "3";
public const string Minor = "3"; public const string Minor = "3";
public const string Build = "0"; public const string Build = "0";
public const string Revision = "1590"; public const string Revision = "1593";
public const string MainVersion = Major + "." + Minor; public const string MainVersion = Major + "." + Minor;
public const string FullVersion = Major + "." + Minor + "." + Build + "." + Revision; public const string FullVersion = Major + "." + Minor + "." + Build + "." + Revision;

View file

@ -1,4 +1,4 @@
%MINOR%=3
%REVISION%=1590
%COREVERSION%=0 %COREVERSION%=0
%REVISION%=1593
%MINOR%=3
%MAJOR%=3 %MAJOR%=3

View file

@ -0,0 +1,24 @@
uses Graph3D;
begin
var РисоватьОписанныеСферы := True;
var p := P3D(6,0,0);
var p1 := p;
var h := -4;
Icosahedron(p,2,Colors.Green);
p.Offset(h,0,0);
Dodecahedron(p,2,Colors.Blue);
p.Offset(h,0,0);
Tetrahedron(p,2,Colors.Red);
p.Offset(h,0,0);
Octahedron(p,2,Colors.Magenta);
p := p1;
if РисоватьОписанныеСферы then
loop 4 do
begin
var s := Sphere(p,2.0,DiffuseMaterial(Colors.Gold.ChangeAlpha(64))+SpecularMaterial(64));
s.BackMaterial := nil;
p.Offset(h,0,0);
end;
end.

View file

@ -1 +1 @@
!define VERSION '3.3.0.1590' !define VERSION '3.3.0.1593'

View file

@ -9683,6 +9683,12 @@ begin
Result := (a <= Self) and (Self <= b) or (b <= Self) and (Self <= a); Result := (a <= Self) and (Self <= b) or (b <= Self) and (Self <= a);
end; end;
/// Возвращает True если значение находится между двумя другими
function InRange(Self: integer; a,b: integer): boolean; extensionmethod;
begin
Result := (a <= Self) and (Self <= b) or (b <= Self) and (Self <= a);
end;
// Дополнения февраль 2016: IsEven, IsOdd // Дополнения февраль 2016: IsEven, IsOdd
@ -9742,6 +9748,11 @@ begin
Result := (a <= Self) and (Self <= b) or (b <= Self) and (Self <= a); Result := (a <= Self) and (Self <= b) or (b <= Self) and (Self <= a);
end; end;
function InRange(Self: real; a,b: real): boolean; extensionmethod;
begin
Result := (a <= Self) and (Self <= b) or (b <= Self) and (Self <= a);
end;
/// Возвращает квадратный корень числа /// Возвращает квадратный корень числа
function Sqrt(Self: real): real; extensionmethod; function Sqrt(Self: real): real; extensionmethod;
begin begin
@ -9798,6 +9809,12 @@ begin
Result := (a <= Self) and (Self <= b) or (b <= Self) and (Self <= a); Result := (a <= Self) and (Self <= b) or (b <= Self) and (Self <= a);
end; end;
/// Возвращает True если значение находится между двумя другими
function InRange(Self: char; a,b: char): boolean; extensionmethod;
begin
Result := (a <= Self) and (Self <= b) or (b <= Self) and (Self <= a);
end;
/// Предыдущий символ /// Предыдущий символ
function Pred(Self: char); extensionmethod := PABCSystem.Pred(Self); function Pred(Self: char); extensionmethod := PABCSystem.Pred(Self);
@ -9857,6 +9874,12 @@ begin
Result := (a <= Self) and (Self <= b) or (b <= Self) and (Self <= a); Result := (a <= Self) and (Self <= b) or (b <= Self) and (Self <= a);
end; end;
/// Возвращает True если значение находится между двумя другими
function InRange(Self: string; a,b: string): boolean; extensionmethod;
begin
Result := (a <= Self) and (Self <= b) or (b <= Self) and (Self <= a);
end;
/// Считывает целое из строки начиная с позиции from и устанавливает from за считанным значением /// Считывает целое из строки начиная с позиции from и устанавливает from за считанным значением
function ReadInteger(Self: string; var from: integer): integer; extensionmethod; function ReadInteger(Self: string; var from: integer): integer; extensionmethod;
begin begin

View file

@ -385,6 +385,8 @@ procedure Println(params args: array of object);
procedure Print(s: string); procedure Print(s: string);
procedure Println(s: string); procedure Println(s: string);
procedure Print(c: char);
procedure Println(c: char);
// == Версия 4.15. Конец дополнений == // == Версия 4.15. Конец дополнений ==
@ -1721,15 +1723,10 @@ end;
// == Версия 4.15. Дополнения == // == Версия 4.15. Дополнения ==
procedure Print(s: string); procedure Print(s: string) := Write(s);
begin procedure Println(s: string) := Write(s);
write(s); procedure Print(c: char) := Write(c);
end; procedure Println(c: char) := Write(c);
procedure Println(s: string);
begin
write(s);
end;
// == Версия 4.15. Конец дополнений == // == Версия 4.15. Конец дополнений ==

File diff suppressed because it is too large Load diff

4
TestSuite/LamInit.pas Normal file
View file

@ -0,0 +1,4 @@
begin
var l: string -> integer := t->t.Where(c->c='0').Count;
Assert(l('abc0')=1);
end.

View file

@ -4750,7 +4750,7 @@ namespace PascalABCCompiler.TreeConverter
internal void visit_method_call(SyntaxTree.method_call _method_call) internal void visit_method_call(SyntaxTree.method_call _method_call)
{ {
// frninja 01/03/16 - for iterator capturing (yield) // frninja 01/03/16 - for iterator capturing (yield)
if (_method_call.dereferencing_value is yield_unknown_ident) if (_method_call.dereferencing_value is yield_unknown_ident)
{ {
var nodeToVisit = new method_call(ProcessUnknownIdent(_method_call.dereferencing_value as yield_unknown_ident), _method_call.parameters); var nodeToVisit = new method_call(ProcessUnknownIdent(_method_call.dereferencing_value as yield_unknown_ident), _method_call.parameters);
visit(nodeToVisit); visit(nodeToVisit);
@ -15179,6 +15179,7 @@ namespace PascalABCCompiler.TreeConverter
{ {
MaybeConvertFunctionLambdaDefinitionToProcedureLambdaDefinition(fld1); MaybeConvertFunctionLambdaDefinitionToProcedureLambdaDefinition(fld1);
LambdaHelper.InferTypesFromVarStmt(tn, fld1, this); //lroman// LambdaHelper.InferTypesFromVarStmt(tn, fld1, this); //lroman//
fld1.lambda_visit_mode = LambdaVisitMode.VisitForAdvancedMethodCallProcessing; //SSM 12.2017
} }
ref_type_node rt = tn as ref_type_node; ref_type_node rt = tn as ref_type_node;
@ -15205,7 +15206,8 @@ namespace PascalABCCompiler.TreeConverter
else else
{ {
_var_def_statement.inital_value = get_possible_array_const(_var_def_statement.inital_value,tn); _var_def_statement.inital_value = get_possible_array_const(_var_def_statement.inital_value,tn);
inital_value = convert_strong_to_constant_or_function_call_for_varinit(convert_strong(_var_def_statement.inital_value), tn); var ivc = convert_strong(_var_def_statement.inital_value);
inital_value = convert_strong_to_constant_or_function_call_for_varinit(ivc, tn);
} }
} }
else else

View file

@ -1123,6 +1123,7 @@ namespace VisualPascalABCPlugins
public override void visit(function_lambda_definition node) public override void visit(function_lambda_definition node)
{ {
prepare_node(node.formal_parameters, "formal_parameters"); prepare_node(node.formal_parameters, "formal_parameters");
prepare_node(node.proc_body, "proc_body");
prepare_node(node.return_type, "return_type"); prepare_node(node.return_type, "return_type");
} }
public override void visit(function_lambda_call node) public override void visit(function_lambda_call node)

File diff suppressed because it is too large Load diff

View file

@ -385,6 +385,8 @@ procedure Println(params args: array of object);
procedure Print(s: string); procedure Print(s: string);
procedure Println(s: string); procedure Println(s: string);
procedure Print(c: char);
procedure Println(c: char);
// == Версия 4.15. Конец дополнений == // == Версия 4.15. Конец дополнений ==
@ -1721,15 +1723,10 @@ end;
// == Версия 4.15. Дополнения == // == Версия 4.15. Дополнения ==
procedure Print(s: string); procedure Print(s: string) := Write(s);
begin procedure Println(s: string) := Write(s);
write(s); procedure Print(c: char) := Write(c);
end; procedure Println(c: char) := Write(c);
procedure Println(s: string);
begin
write(s);
end;
// == Версия 4.15. Конец дополнений == // == Версия 4.15. Конец дополнений ==