Sign in Join
Wiki copytemporary

Absolute/es: what changed

Revision 0 to 1. Removed lines have a minus sign; added lines have a plus sign.

Title: Absolute/es

OldNewLine
1+El modificador Absolute hace que una variable se almacene en la misma dirección de memoria que otra variable.
2+
3+``` pascal
4+Var
5+ sintI: ShortInt;
6+ lintI: LongInt absolute sintI;
7+
8+begin
9+ // visualización correcta
10+ lintI := 20;
11+ ShowMessage(inttostr(lintI) + ' ' + inttostr(sintI)); // Se muestra: 20 20
12+
13+ // visualización absurda
14+ lintI := 2000;
15+ ShowMessage(inttostr(lintI) + ' ' + inttostr(sintI)); // Se muestra: 2000 -45
16+end;
17+```
18+
19+---
20+*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](/wiki-contact).*
21+Category: Reserved words/es

Back to history