Changeset 108 for branches/interpreter/interpreter4/Execute.pas
- Timestamp:
- Jul 26, 2017, 11:35:26 PM (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/interpreter/interpreter4/Execute.pas
r107 r108 8 8 type 9 9 TVariableValue = record 10 VarRef: PVariable ;10 VarRef: PVariableRef; 11 11 BaseType: TBaseType; 12 12 case Integer of … … 254 254 begin 255 255 case GetValue.ReadType of 256 rtVariable: AssignVariable(Value, ExecutionContextCurrent^.VariableValues.GetByName(GetValue.Variable ^.Name));256 rtVariable: AssignVariable(Value, ExecutionContextCurrent^.VariableValues.GetByName(GetValue.VariableRef^.Variable^.Name)); 257 257 //rtConstant: Value := ExecutionContextCurrent^.VariableValues.GetByName(GetValue.Variable^.Name); 258 258 rtExpression: ExecuteExpression(GetValue.Expression, Value); … … 352 352 Param := @Execution^.Parameters.Items[I]; 353 353 if (Param.ReadType = rtVariable) then 354 AssignVariable(ExecutionContextCurrent^.VariableValues.GetByName(Param.Variable .Name), DestVar)354 AssignVariable(ExecutionContextCurrent^.VariableValues.GetByName(Param.VariableRef^.Variable^.Name), DestVar) 355 355 else ShowError('Function var parameter can be only variable'); 356 356 end; … … 362 362 SrcVariable: TVariableValue; 363 363 begin 364 DestVariable := ExecutionContextCurrent^.VariableValues.GetByName(Assignment^.Destination^. Name);365 WriteLn('Assignment to ' + Assignment^.Destination^. Name);364 DestVariable := ExecutionContextCurrent^.VariableValues.GetByName(Assignment^.Destination^.Variable^.Name); 365 WriteLn('Assignment to ' + Assignment^.Destination^.Variable^.Name); 366 366 FillChar(SrcVariable, SizeOf(TVariableValue), 0); 367 367 ExecuteGetValue(@Assignment^.Source, @SrcVariable); … … 395 395 begin 396 396 I := 0; 397 while (I < Length(Items)) and (Items[I].VarRef^. Name <> Name) do Inc(I);397 while (I < Length(Items)) and (Items[I].VarRef^.Variable^.Name <> Name) do Inc(I); 398 398 if I < Length(Items) then Result := @Items[I] 399 399 else Result := nil;
Note:
See TracChangeset
for help on using the changeset viewer.