Sign in Join
Wiki copytemporary

Revision 1 of 1, by Trev on 1-25-2020. The page as it is now.

Absolute/es

El modificador Absolute hace que una variable se almacene en la misma dirección de memoria que otra variable.

pascal
Var
  sintI: ShortInt;
  lintI: LongInt absolute sintI;

begin
  // visualización correcta
  lintI := 20;
  ShowMessage(inttostr(lintI) + '  ' + inttostr(sintI)); // Se muestra: 20  20

  // visualización absurda
  lintI := 2000;
  ShowMessage(inttostr(lintI) + '  ' + inttostr(sintI)); // Se muestra: 2000 -45
end;

From the Free Pascal wiki, page "Absolute/es", as it stood on 2020-01-25 after a change by Trev, out of the wiki's dump of 2024-05-26. Copyright stays with the author who wrote it, according to the old wiki's Licensing page. If you have concerns about this material, message the admin.