Changeset 236 for branches/xpascal/Source.pas
- Timestamp:
- Jun 29, 2023, 1:47:58 AM (17 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/xpascal/Source.pas
r233 r236 133 133 Block: TBlock; 134 134 ParentType: TType; 135 procedure InitVariables; 135 136 procedure GetValue(Index: Integer; out Value); override; 136 137 function GetField(Index: Integer): TField; override; … … 159 160 Block: TBlock; 160 161 ParentType: TType; 162 procedure InitVariables; 161 163 procedure GetValue(Index: Integer; out Value); override; 162 164 function GetField(Index: Integer): TField; override; … … 533 535 end; 534 536 537 procedure TProcedure.InitVariables; 538 var 539 I: Integer; 540 Variable: TVariable; 541 begin 542 for I := 0 to Params.Count - 1 do begin 543 Variable := TVariable.Create; 544 Variable.Name := Params[I].Name; 545 Variable.TypeRef := Params[I].TypeRef; 546 Variable.Internal := True; 547 Block.Variables.Add(Variable); 548 end; 549 end; 550 535 551 procedure TProcedure.GetValue(Index: Integer; out Value); 536 552 begin … … 932 948 begin 933 949 Result := 4; 950 end; 951 952 procedure TFunction.InitVariables; 953 var 954 I: Integer; 955 Variable: TVariable; 956 begin 957 for I := 0 to Params.Count - 1 do begin 958 Variable := TVariable.Create; 959 Variable.Name := Params[I].Name; 960 Variable.TypeRef := Params[I].TypeRef; 961 Variable.Internal := True; 962 Block.Variables.Add(Variable); 963 end; 964 965 Variable := TVariable.Create; 966 Variable.Name := 'Result'; 967 Variable.TypeRef := ResultType; 968 Variable.Internal := True; 969 Block.Variables.Add(Variable); 934 970 end; 935 971
Note:
See TracChangeset
for help on using the changeset viewer.