MOVED: problem with dynamic array of dynamic array

Moved to: embarcadero.public.delphi.language.delphi.general

or: https://forums.embarcadero.com/thread.jspa?threadID=57076

-- 
Rudy Velthuis

Rudin's Law: In a crisis that forces a choice to be made among 
alternative courses of action, people tend to choose the worst 
possible course.
0
Rudy
7/16/2011 6:04:42 PM
embarcadero.delphi.non-tech 5933 articles. 1 followers. Follow

0 Replies
553 Views

Similar Articles

[PageSpeed] 31

Reply:

Similar Artilces:

problem with dynamic array of dynamic array
var a:array of array of integer; begin setlength(a,2); setlength(a[0],1); setlength(a[1],2); a[0,0]:=1; //it is ok a[0,1]:=2; //it is not ok in my understanding a[0,1]:=2 is not ok because a[0] has only one element as i declared setlength(a[0],1) so i dont understand why this code exemple is compiled and run just fine ? > {quote:title=Yossi Rozenberg wrote:}{quote} > in my understanding a[0,1]:=2 is not ok because a[0] has only one element as i declared setlength(a[0],1) so i dont understand why this code exemple is compiled and run just fine ? By default, acces...

Arrays, Arrays, Arrays
I mainly come from a JScript classic ASP background and I'm liking both C#.net and JScript.net. Now I have to say... "What's happened to arrays?" They used to be so flexible and easy to use. Here are my quick questions... Am I allowed to create an array with a non specified length so that I can add to it? If not then how can I modify an array's length? Can I create an array with a named index eg myArray["apple"] = "tasty"; or is the hash table the equivalent for this now? The classic array methods and properties like pop(), push(), length etc... are ...

Dynamic Arrays / Static Arrays
If I call SetLength on a dynamic array, does it become more or less a static array? In use is there much difference between a dynamic and a static array? The reason I ask is becaue I don't seem to have had much use for dynamic arrays in what I've created in the past but due to a change of approach in one program I now need to declare an array without knowing how many elements it will have. In the previous incarnation I always knew in advance that the array would have 15 elements. I don't know why I've not had to ask this question before, but as usual, when I do have to...

array of dates placed in dynamic array
Ok---I want to take an array of dates and load it into a dynamic array.  The reason I have duplicate dates in my dataset.  This means when it loads the 2nd or even 3rd date for that date. It just overrides the previous date's text.  So I need to load the date along w/the string into a dynamic array, so I can access it Right now to load the date I do the following: For rowCount = 0 To DsVacationData1.RequestDataManager.Rows.Count - 1row = DsVacationData1.RequestDataManager.Rows(rowCount)sDate = CStr(CDate(row.Item(1)))sEmployee = row.Item(8).ToString + " " + row.Item(9).ToStr...

Problem with dynamic string array
Hi All I do have the following problem I declare a string array here private Details : array of array of String; //Details : Array[0..53,0..3] of string; somewhere in the code I assign values to it SetLength(Details, 53,3); for i := 0 to 52 do begin Details[i,0] := '-'; Details[i,1] := IntToStr(i); Details[i,2] := FullName; Details[i,3] := prio; end; everything is fine, but if I then call via a Button Event //Details := nil; Release; I got Exeptions. If I do this with a non Dynamic Array everything is fine, what do I...

referring to an array in an array of arrays
How can I get at an array in an array of arrays? I'm creating the arrays using: $fComments[$i++] = [ @comments ]; Now I want to get back what I put in: print "$fComments[0]\n"; but this prints ARRAY(0x107671f0). How do I follow that pointer? (I really think we need a pre-beginners list... =) TIA. - B You can try something like this: print "@{$fComments[0]}\n"; Which will attempt to dereference the array at $fComments[0]. -----Original Message----- From: Bryan R Harris [mailto:Bryan_R_Harris@raytheon.com] Sent: Tue...

Concatenating arrays from arrays of arrays
Hello - I am trying to accumulate items in a flat list (array) by concatenating on to it the scalars contained in arrays which in turn are contained in arrays. The data is to be read in from a file rather than existing as literals in my code. Everything I try either crashes the computer or gives me an array of arrays instead of a flat list. I have been programming in Unicon which has a concatenate operator, but Perl makes very heavy weather of nested list management. Should I switch to Lisp, or is there a way of doing what I want to do in Perl? Regards _John Sampson_ On...

How to unshift to an array in an array of arrays?
How to unshift to an array in an array of arrays? > -----Original Message----- > From: Angerstein [mailto:ang@nmc-m.dtag.de] > Sent: Wednesday, August 28, 2002 6:12 AM > To: beginners@perl.org > Subject: How to unshift to an array in an array of arrays? > > > How to unshift to an array in an array of arrays? $ perl -d -e 1 ..... DB<1> @aoa = ([qw(foo bar baz)]) << create array of arrays DB<2> x @aoa 0 ARRAY(0x80f82dc) 0 'foo' 1 'bar' 2 'baz' DB<3> unshift @{$aoa[0]}, 'qu...

Dynamic Array
Hi I have the following code: Public Class WebForm1 Inherits System.Web.UI.Page Public partitions(50, 3) As String Dim lblNoParts, lblNoParts2 As New Label #Region " Web Form Designer Generated Code " 'This call is required by the Web Form Designer. <System.Diagnostics.DebuggerStepThrough()> Private Sub InitializeComponent() End Sub Protected WithEvents Button1 As System.Web.UI.WebControls.Button Protected WithEvents Form1 As System.Web.UI.HtmlControls.HtmlForm Protected WithEvents Button2 As System.Web.UI.WebControls.Button ...

Dynamic Array
Any idea how to create a large dynamic array? Normally I use MyArray: Array of Double; SetLength(MyArray, SomeLength); But SomeLength in SetLength cannot be large than an Integer. I need to create an array of 12288 by 17000 16 bit. Is this possible? Can I allocate a large block of memory? Peter. Edited by: Peter Herijgers on Jan 30, 2009 2:36 AM > But SomeLength in SetLength cannot be large than an Integer. And thats good since the total amount of system memory you can address is 2GB (3GB at most). So you are only allowed to allocate (2GB div sizeof(double)) elem...

Array of Arrays
Hi, I am looking for a way to create an array of arrays which needs to be passed to Oracle database to minimize the round trips to hte server. I was successful in sending simple arrays so far but no idea on how to create array of arrays in PB. I have used structures to simulate this but looks like I can't send the structure to Oracle. Anyone has any suggestions? Thanks, Anil Please don't cross-post. On 3 Mar 2005 14:02:47 -0800, Anil wrote: >Hi, > >I am looking for a way to create an array of arrays which >needs to be passed to Oracle database t...

dynamic array
How would I create an array based on comma seperated values from a database table? The idea is that in my table I will have a field called size like the following Record 1: 32,34,36,38,40,42 Record 2: 32,34,36 Record 3: Small, Medium, Large Record 4: Small, Large On my page I would like to split these and enter them in a drop down list. Each record may well have a different number of sizes Any advice gratefully received Easy, use the Split method of each string ...<%@ Page Language="VB" %> <script runat="server"&g...

[@array] and \@array
Given the case, my @array = (1,2,3,4); my $var1 = [@array]; my $var2 = \@array; What's the difference between $var1 and $var2? Are they all refered to @array? Thanks guys. On 3/22/07, Jm lists <practicalperl@gmail.com> wrote: > Given the case, > > my @array = (1,2,3,4); > my $var1 = [@array]; > my $var2 = \@array; > > What's the difference between $var1 and $var2? > Are they all refered to @array? > Thanks guys. $var2 is a reference to @array. $var1 is a reference to new array. Observe #!/usr/bin/perl use strict; use war...

Array of arrays
Hi I'm trying to return from a web service a array of arrays, one of the arrays is a array of objects, which I tested separately and it's working fine, and another array of integer and another of strings. When I run the web service I got this:You must implement a default accessor on System.Array because it inherits from ICollectionDefault accessor what that means? Thank you very much.  As Heinlein said "specialization is for insects" explore beyond the universe. Could you pls post the relevant code ? hi rushan thank you for the reply the code is here:  ...

Web resources about - MOVED: problem with dynamic array of dynamic array - embarcadero.delphi.non-tech

Is–ought problem - Wikipedia, the free encyclopedia
The is–ought problem in meta-ethics as articulated by Scottish philosopher and historian David Hume (1711–76) is that many writers make claims ...

Serious fox problem near Yass Gorge
Residents seek help, saying fox epidemic is threatening the native biodiversity. &nbsp;

STEM Crisis: NSW Education Minister Adrian Piccoli to focus on STEM's image problem
They are seen as domains for &quot;geniuses&quot;, &quot;geeks&quot;, &quot;nerds&quot; and &quot;not for girls&quot;. And it's holding the nation ...

Apple’s App Store has a copyright infringement problem, business owner claims
... iOS apps scraping content from the web and packaging it in paid apps. While developer relations issues often get a lot of attention, the problem ...

Marco Rubio accidentally stumbles on the problem with religious pandering
... plan for the universe and for our lives that we are just not going to know the answer to. God’s ways are not our ways.” There are two problems ...

Recharge Wrap-up: Formula E battery award, Tesla NOx problem
Filed under: Government/Legal , Green , Motorsports , Plants/Manufacturing , Tesla , Emissions , Fuel Efficiency , Technology , Electric Williams ...

Apple's App Store has a copyright problem
... then made more apps — all of which are paid-for — and Raub says Apple is unwilling to help this time. 9to5Mac points out that this problem ...

Out-Of-Town Trip In The Nissan LEAF — No Problem
... driving to St. Petersburg, to Tampa, or south to Venice or Englewood is gone. The [&hellip Out-Of-Town Trip In The Nissan LEAF — No Problem ...

The Problem With Ted Cruz’s ‘Firewall’: Conservative States Award Delegates Proportionally
A few months ago, I was among the early commentators who observed that might just be running a brilliant stealth campaign. His recent polling ...

Responsible Gun Owners Are Part Of The Problem
A Responsible Gun Owner took offense to my use of the hashtag #GunsAreTheEnemy on Facebook and wrote defending his ri...

Resources last updated: 12/4/2015 10:04:28 PM