Skip to content

Commit 85b2be7

Browse files
committed
tweak readme
1 parent c5dfb92 commit 85b2be7

File tree

3 files changed

+10
-11
lines changed

3 files changed

+10
-11
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -267,7 +267,7 @@ begin
267267
ScriptCode :=
268268
'print "SharedVar from FPC was " + SharedVar.ToStr();'+ LineEnding +
269269
'SharedVar := SharedVar + 5;' + LineEnding +
270-
'var Result := "New value is " + SharedVar.ToStr();';
270+
'var Result := 10000';
271271
272272
// 4. Compile and run the script.
273273
ScriptResult := Script.RunCode(ScriptCode);

compiler/xpr.express.pas

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -315,24 +315,24 @@ function TExpress.GetVar(const AName: string): Variant;
315315
xtAnsiChar: Result := PAnsiChar(ptr)^;
316316
xtAnsiString: Result := PAnsiString(ptr)^;
317317
else
318-
Result := Integer(ptr);
318+
Result := PtrUInt(ptr);
319319
end;
320320
end;
321321
end;
322322

323323
function TExpress.XprTypeFromVariant(const AValue: Variant): XType;
324324
begin
325325
case VarType(AValue) of
326-
varByte: Result := Context.GetType(xtUInt8);
327-
varWord: Result := Context.GetType(xtUInt16);
326+
varByte: Result := Context.GetType(xtUInt8);
327+
varWord: Result := Context.GetType(xtUInt16);
328328
varLongWord: Result := Context.GetType(xtUInt32);
329-
varUInt64: Result := Context.GetType(xtUInt64);
329+
varUInt64: Result := Context.GetType(xtUInt64);
330330
varSmallint: Result := Context.GetType(xtInt16);
331-
varInteger: Result := Context.GetType(xtInt32);
332-
varInt64: Result := Context.GetType(xtInt64);
333-
varSingle: Result := Context.GetType(xtSingle);
334-
varDouble: Result := Context.GetType(xtDouble);
335-
varBoolean: Result := Context.GetType(xtBoolean);
331+
varInteger: Result := Context.GetType(xtInt32);
332+
varInt64: Result := Context.GetType(xtInt64);
333+
varSingle: Result := Context.GetType(xtSingle);
334+
varDouble: Result := Context.GetType(xtDouble);
335+
varBoolean: Result := Context.GetType(xtBoolean);
336336
varOleStr, varString:
337337
begin
338338
if Length(AValue) = 1 then

examples/cluster.xpr

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,5 +69,4 @@ func Benchmark(): Int
6969
Result := Clusters.Len()
7070
end
7171

72-
7372
var Result := Benchmark()

0 commit comments

Comments
 (0)