Forum > FPC development
"un"def Types
paule32:
Hello,
is it possible to "un"def given Types ?
I would try to compile a system.pas unit, and the fpc compiler tells me,
that SmallInt is dupplicated.
Here is the line:
type Smallint = -32768..32767;
How can I "un"def SmallInt, if exists, and when yes, then re-type it.
Thanks for reading
PascalDragon:
You can't because SmallInt is an internal type provided by the compiler itself.
Thaddy:
What is your purpose?
Leledumbo:
Not for system unit. Elsewhere, you can override it while still referring to the system unit one by fully qualified name. The compiler has internal type definitions (about 8 or so) that cannot be changed without changing the compiler (system unit alone is not enough).
circular:
You could redefine the type so that it cannot be used.
--- Code: Pascal [+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i < x.length; i++) { x[i].style.maxHeight='none'; x[i].style.height = Math.min(x[i].clientHeight+15,306)+'px'; x[i].style.resize = "vertical";}};} ---type Smallint = record end; var a: Smallint; begin a := 3; // compile time errorend;
Navigation
[0] Message Index
[#] Next page