Skip to main content
Filter by
Sorted by
Tagged with
1 vote
1 answer
183 views

Is it possible to use an open array as index type for indexed properties? unit OpenArrayAsPropertyIndex; interface type TFoo = class private function getBar(Index: array of Integer): String;...
malom's user avatar
  • 243
6 votes
1 answer
402 views

I'm using Delphi 2007 (Pre generics) and I've defined many functions who can be used for all arrays of TObject's descendants, example: function IndexOf(AArray : array of TObject; AItem : TObject) : ...
Fabrizio's user avatar
  • 8,073
1 vote
0 answers
836 views

Sometimes I get "E2251 Ambiguous overloaded call to 'MyMethodName'" when passing open arrays to overloaded methods. Example: TForm1 = class(TForm) procedure FormCreate(Sender: TObject); ...
Fabrizio's user avatar
  • 8,073
1 vote
1 answer
505 views

I have a record defined like this: TRec = record S: string; I: Integer; end; I can initialize a constant of this record type like this: const Rec: TRec = (S:'Test'; I:123); Now I have a ...
Alex Egorov's user avatar
0 votes
1 answer
162 views

I am working on a code where an array is passed to a function by passing the pointer to the first location. In the function, part of the array is used. This creates an unsafe situation because there ...
user3469604's user avatar
6 votes
1 answer
165 views

When compiled under Delphi 7 or Delphi XE, the code below complains [DCC Error] Project1.dpr(25): E2010 Incompatible types: 'array of Char' and 'TAChar' According to Rudy's article, it should be ...
SOUser's user avatar
  • 3,862
9 votes
5 answers
708 views

(I already asked this at CodeReview where it got closed as off-topic. Hopefully it's on-topic here.) I have a static arrays of a derived type (like LabelsA: array[0..3] of TLabel; in the following ...
Uli Gerhardt's user avatar
9 votes
1 answer
516 views

Using Delphi XE-2 (all updates applied). I would expect the following code to generate compilation errors on the DoSomething and DoInteger calls, but it doesn't. program OpenArrayQuestion; {$...
Marjan Venema's user avatar
0 votes
1 answer
3k views

This question is a part of my question how to pass javascript array to oracle store procedure by ado parameter object I think divide it to 3 small parts will get answer faster. For this question. I ...
Simon Sheng's user avatar
5 votes
3 answers
11k views

I want to pass the formatting arguments Args into the Format function. I found some examples of that, but I can't find out how to assign string constant in the TVarRec member. The following code fails ...
user avatar
0 votes
5 answers
337 views

So I'm working in Delphi 2007 and I am cleaning up my code. I have come to notice that in a great many procedures I declare a number of different variables of the same type. for example the one ...
Tim's user avatar
  • 1,559
11 votes
3 answers
3k views

I was looking at Delphi: array of Char and TCharArray "Incompatible Types" and started experimenting. What I discovered is rather interesting. procedure Clear(AArray: array of Integer); var ...
Kenneth Cochran's user avatar