I feel stupid asking this, but here it goes...
Posted on 2003-03-25
Okay i'm starting to feel bad now... constantly asking such "newbie" questions on "experts-exchange" but oh well, it's hard to find good delphi resources. I have books but they dont explain everything. Anyways, here is my next oh so hard question! =) Get ready to rack up the points guys!
Loading an array
Okay of coarse it's really easy to load your basic array like
MyArray: Array [0..1] of Integer;
But is there a way (i'm doubting it, but you never know) to load a larger array easier, for example, lets say I have an array like
MyArray: [0..49] of String;
MyArray := 'Here is a string';
MyArray := 'Wow another string';
MyArray := 'This is getting tedious';
Is there a way to do something like (of coarse this doesnt compile, but I think it will show what I am trying to do)
MyArray := ('Here is a string', 'Wow another string', 'This is not as tedious if I could do this');
Like I said, of coarse that doesnt compile, but what i'm trying to do is load an array of strings without havint to do the MyArray[x] := 'some string'; but load them all with fewer lines of code.
This question is kinda weird so if you guys don't know what i'm trying to ask, then I will be glad to try and explain this even better. Darn i wish I had friends that used Delphi... everyone is into VB! The books I have don't say anything about doing something like this, so I am kind of assuming I will have to do it the longer way. I would offer more points, but i'm running a bit low right now... sorry
Best Regards, again