[Coco] question C++

Mark McDougall msmcdoug at iinet.net.au
Wed Mar 21 10:30:07 EDT 2012


On 22/03/2012 12:03 AM, Luis Fernández wrote:

> ANYONE can tell me the meaning&  here
> write_buf (h, 1,&  val);

The '&' is the 'address of' operator, so it passes the address of the 'val' 
variable.

> static void write_buf_const (dmk_handle h, int count, uint8_t val)
> {
>   while (count--)
>     write_buf (h, 1, &val);
> }

This looks like it writes 'count' number of pad bytes of value 'val'.

Regards,

-- 
|              Mark McDougall                | "Electrical Engineers do it
|  <http://members.iinet.net.au/~msmcdoug>   |   with less resistance!"



More information about the Coco mailing list