t2t-soft

This article can be obsolete: Actual documentation online

Static arrays


Static arrays in C++ are declared siimilar as in Delphi:

TArray2 = array [1..10] of Char
->
typedef char [ 10 ] TArray2


While in Delphi the lower bound and the upper bound have to be defined, in C++ arrays are always zero based, i.e. the undermost index is 0 and the topmost index is the size of the array minus 1.
Up to the version 1.2.4. of Delphi2Cpp it was the strategy to size the C++ arrays as the upper bound of the original Delphi array plus one. This strategy was changed with version 1.2.5. From now on the size of the C++ array is determined by the number of elements, i.e. that genuine zero based arrays are used.

The upper bound of an array is calculated by means of a macro:


#define HIGH(x) (sizeof(x)/sizeof(x[0]))-1




   deutsch Deutsch


 
Latest News
05/18/26
Delphi2Cpp 2.7: Translation heuristics [more...]

11/18/25
Delphi2Cpp 2.6: Delphi Interfaces [more...]



"We have successfully completed the projects, and the applications are (for the most part) already running at our customers' sites."





"Thanks for your great work, really appreciate the work you have done on zlib and compiling ... test case."


Mattewada, Udayabhaskar
Nokia India 02/01/2021




[from case study...]

"A masterpiece -- Delphi2Cpp has exceeded all my expectations by far."


Tony Hürlimann
virtual-optima 08/20/2011



"First off, I have to say WOW! Delphi2Cpp is doing a *fantastic* job!"


Daniel Flower
linkrealms 01/15/2011



"Though we have not finished the conversion yet, I'm glad that we've found you and could transform Eurocap to C++ with the help of Delphi2CB and you. (And I'm also glad that we could help you to make Delphi2CB better😉)"


Gáspár Huba


 
This website is generated from plain text with [Minimal Website]

Minimal Website
 
Minimal Website is made with TextTransformer

TextTransformer
 
TextTransformer is made with Borland C++Builder

  Borland