What’s the difference between an integer and a pointer?

In an assembly language we typically don’t have to worry very much about the distinction between pointers and integers. Some instructions happen to generate addresses whereas others behave arithmetically, but underneath there’s a single data type: bitvectors. At the opposite end of the PL spectrum, a high-level language won’t offer opportunities for pointer/integer confusion because the abstractions are completely firewalled off from each other. Also, of course, a high-level language may choose not to expose anything that resembles a pointer.

3 Comments

  1. Dr.Cyber 2018-09-25 3:06 pm EST
    • Alfman 2018-09-25 6:57 pm EST
  2. RobG 2018-09-26 10:47 am EST