Forum > Beginners

Where the Pointer type is declared? [solved]

(1/1)

MNeto:
Hello.

I am a new user of the Free Pascal and Lazarus.

I'm reading the documentation and learning the Object Pascal language used by Free Pascal.

My question is:

I know I can declare a pointer like this:


--- Code: ---var p: Pointer;
--- End code ---

But did not found the documentation for this type. What is he? A class?
What type is the "Pointer" type? I can not locate the unit where it is declared. What this type mean?

At another site, which also uses Pascal, is said to Pointer is a type declared in the System unit. But when I look at the Free Pascal documentation, I found nothing about it.

Thank you in advance.

eny:
It is one of the built-in types, just like integer, boolean etc.
A pointer is just what it says, a pointer (to another data structure, variable etc.).
http://www.freepascal.org/docs-html/ref/refse15.html#x46-530003.4

MNeto:
Thanks for the answer.

My question was what types such as Integer, among others, are declared in the System unit. I could not find the declaration of 'Pointer' nowhere.

I know this is not a question so important. But really I got this curiosity.

marcov:

--- Quote from: MNeto on August 21, 2015, 04:12:47 pm ---My question was what types such as Integer, among others, are declared in the System unit. I could not find the declaration of 'Pointer' nowhere.

--- End quote ---

- Integer, like pointer is built-in, but it is redefined in the objpas system unit enhancement (unit objpas, automatically loaded for modes objfpc and delphi).

- some types are pseudo defined in system.fpd. This sourcefile is not really used except by the documentation system. It contains equivalent declarations for built-in types.  However the pointer type isn't defined there either.

So in summary, pointer is built-in without even a (re-)declaration for documentation purposes.

MNeto:
Thank you.
Now I understand.

Navigation

[0] Message Index

Go to full version