Steema Issues Database

Note: This database is for bugs and wishes only. For technical support help, if you are a customer please visit our online forums;
otherwise you can use StackOverflow.
Before using this bug-tracker we recommend a look at this document, Steema Bug Fixing Policy.



Bug 531 - About the data size of AddArray function in C++ Builder.
Summary: About the data size of AddArray function in C++ Builder.
Status: RESOLVED NOTABUG
Alias: None
Product: VCL TeeChart
Classification: Unclassified
Component: Series (show other bugs)
Version: 131119
Hardware: PC Windows
: --- normal
Target Milestone: ---
Assignee: Steema Issue Manager
URL: http://www.teechart.net/support/viewt...
Keywords:
Depends on:
Blocks:
 
Reported: 2014-01-09 04:37 EST by narcís calvet
Modified: 2023-12-15 02:28 EST (History)
3 users (show)

See Also:
Chart Series: ---
Delphi / C++ Builder RAD IDE Version:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description narcís calvet 2014-01-09 04:37:21 EST
According to the description of AddArray function, the second parameter means the data number of the first parameter? But actually it is the data number - 1 ? So if I have a array of 10 elements, I should add data like below?

   double array[10] = {1, 2,3,4,5,6,7,8,9,10};
   Series1->AddArray(array, 9);
Comment 1 david berneda 2014-01-13 04:53:04 EST
Solution:

Series1->AddArray(EXISTINGARRAY(array));

Explanation:

This is a confusing problem with Delphi compiler generating the *.hpp header file.
The second parameter is misleading, named "size" but in reality it is passed the High(array) value ( Count - 1 )

http://docwiki.embarcadero.com/RADStudio/XE5/en/VCL_Compatibility_Macros

We cannot control the param name, it is generated automatically by Delphi compiler.
Comment 2 yeray alonso 2023-12-15 02:28:59 EST
Just adding the link to the latest version of the docwiki explanation, since the previous link doesn't work any more.

http://docwiki.embarcadero.com/RADStudio/en/Special:Search/Delphi%20Compatibility%20Macros