I'm have questions:
what can we do with 'static' and 'dynamic'? And how useful of it?
how can I see useful of it?
you can tell me the difference:
a: array[1..1000] of ^integer;
between
a: array[1..1000] of integer;
x: ^a;
thank you!:)

Hi,

a: array[1..1000] of ^integer; is an array of pointers to integer
a: array[1..1000] of integer; is an array of actual integers;
x: ^a; this would give an error unless those are all defined under a "type" reserved word. If you defined a as a type then this line would define x as a type which is a pointer to a variable of type a.

You can have pointers to any kind of type including records, arrays and pointers themselves. Declaring a pointer variable doesn't make it directly usable as you still need to either manually allocate memory for it from the heap or make it point to an already declared variable using the @ operator or Addr() function.

Loren Soth

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.