dynamic array 
Author Message
 dynamic array

Hello,
I need a 2-dimensional dynamic array of strings. Is there any implementation
around? For Turbo Pascal 6.
Thx,
Florian


Mon, 09 May 2005 21:03:07 GMT  
 dynamic array



Quote:
> Hello,
> I need a 2-dimensional dynamic array of strings. Is there any
implementation
> around? For Turbo Pascal 6.
> Thx,
> Florian

You can best make it yourself.
e.g.

type str80=string[80];
     pstr80=^str80;
var A:array [1..5000,1..2] of pstr80;
const  count:integer=0;

procedure newline;
begin
  if memavail> 2*sizeof(str80) then
  begin
    inc(count);
    new (a[count,1]);
    new (a[count,2]);
  end;
end;

procedure delline;
begin
  dispose (a[count,1]);
  dispose (a[count,2]);
  dec(count);
end;

begin
  newline;
  A[count,1]^:='hello';
  A[count,2]^:='world';
  while count>0 do delline;
end.

Femme



Tue, 10 May 2005 05:11:48 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Dynamic array in database

2. How to store dynamic array to memofield?

3. Dynamic Array puzzle

4. How to declare dynamic array in fpc ??

5. dynamic arrays

6. Memory access; relative position (dynamic array)

7. Heap error while allocating dynamic array in protected.

8. How do you do a dynamic array in oascal

9. Dynamic arrays?????

10. Question: Dynamic arrays in Turbo Pascal

11. Dynamic arrays...

12. dynamic arrays

 

 
Powered by phpBB® Forum Software