Notifications
Clear all

Upgrading This code to control 4 Servos

31 Posts
4 Users
0 Likes
6,693 Views
frogandtoad
(@frogandtoad)
Member
Joined: 5 years ago
Posts: 1458
 
Posted by: @pugwash

A minor correction to some premises already uttered in this thread. The ampersand (&) is actually referred to as a "pointer" and points to the start address of the variable in question.

No, it's always been known and referred to as the "address-of" operator, and never referred to as a pointer.

From the C++ International Standard - ISO/IEC:
5.3.1 Unary operators
        "The result of the unary & operator is a pointer to its operand."

Likewise, in my copy of the "The C+ + Programming Language (Third Edition)", from the creator of the C++ language himself "Bjarne Stroustrup", refers to it as the address-of operator, and that's good enough for me:

Page 26 Chapter 2:
2.3.3 Pointers and Arrays [tour.ptr]
        "Unary & is the address-of operator."


   
ReplyQuote
Page 3 / 3