View Issue Details

IDProjectCategoryView StatusLast Update
0003837JEDI VCL00 JVCL Componentspublic2006-08-22 06:56
ReporterLiorFAssigned Toobones 
PrioritynormalSeveritytrivialReproducibilityalways
Status resolvedResolutionfixed 
Product VersionDaily / GIT 
Target VersionFixed in Version3.30 
Summary0003837: JvInterpreter Length function is incorrect
DescriptionLength function for arrays returns Length-1 instead of length.
Solution:
Add +1 in the relevant line.
TagsNo tags attached.

Activities

obones

2006-07-26 05:20

administrator   ~0009867

The relevant line being?

LiorF

2006-07-26 07:07

reporter   ~0009869

unit :JvInterpreter_System
procedure JvInterpreter_Length
line: Value:=VarArrayHighBound(...

obones

2006-07-29 07:14

administrator   ~0009885

Well, I'm sorry, but I ran this very simple script:

showmessage(inttostr(length('123')));

and it showed 3. To me this is definitely correct. You'll have to be a bit more specific and even give a sample program showing the issue.

LiorF

2006-07-29 12:51

reporter   ~0009912

The problem is with variant arrays. Example:

var
  a:variant;
begin
  a:=VarArrayCreate([0,9],varDouble);
  Result:=Length(a);
end;

By the way, the reason I use variant arrays is because I can't get dynamic arrays fully working. Are they supposed to be fully implemented?

LiorF

2006-08-22 06:06

reporter   ~0009997

Any progress? Was the bug fixed?
It's just adding '+1' in the line I pointed to.

obones

2006-08-22 06:56

administrator   ~0009998

This is now fixed in SVN.
As to dynamic arrays, I have no ideas.

Issue History

Date Modified Username Field Change
2006-07-26 03:58 LiorF New Issue
2006-07-26 05:20 obones Note Added: 0009867
2006-07-26 05:20 obones Status new => feedback
2006-07-26 07:07 LiorF Note Added: 0009869
2006-07-29 07:14 obones Note Added: 0009885
2006-07-29 12:51 LiorF Note Added: 0009912
2006-08-22 06:06 LiorF Note Added: 0009997
2006-08-22 06:56 obones Status feedback => resolved
2006-08-22 06:56 obones Fixed in Version => Daily / SVN
2006-08-22 06:56 obones Resolution open => fixed
2006-08-22 06:56 obones Assigned To => obones
2006-08-22 06:56 obones Note Added: 0009998