I do not understand how ABSOLUTE works? Maybe someone explain?

R: LongWord; RR: Single ABSOLUTE R; 
  • decided to rewrite all the functions from Delphi? :) - Grundy
  • 2
    @Grundy, he realized that if you put the whole piece with a request to transfer from Delphi to C #, then there is a risk to grab a lot of minuses, and if you take a piece, you can also get some advantages :) - ixSci
  • one
    an article about absolute - Ruslan_K
  • one
    ABSOLUTE should pay attention to help - Grundy

1 answer 1

 var A: MyType absolute B; 

says variable A has the same address in memory as variable B

  • It is better to give an example from the reference with the string and its length, it is, in my opinion, much clearer than the abstract - Grundy
  • those. RR will be equal to R? because LongWord and Single by 4 bytes, or am I mistaken? - creamsun
  • 2
    @creamsun wrong. Although LongWord and Single are 4 bytes in size, the internal representation of the number is different. But the value of one variable will depend on the other. They will match only when the value is 0 - Anton Shchyrov
  • @AntonShchyrov and if DD = Trunc (RR); ? R and RR should not change? - creamsun
  • @creamsun With a frightened? What does DD have to do with R and RR? - Anton Shchyrov