www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1998/09/18/11:45:19

From: Martin Ambuhl <mambuhl AT earthlink DOT net>
Newsgroups: comp.os.msdos.djgpp
Subject: Re: Question about pointer
Date: Fri, 18 Sep 1998 11:35:49 -0400
Organization: Nocturnal Aviation
Lines: 21
Message-ID: <36027DD5.A0DB02CA@earthlink.net>
References: <360224e3 DOT 23441421 AT news DOT hknet DOT com>
NNTP-Posting-Host: 1cust249.tnt12.nyc3.da.uu.net
Mime-Version: 1.0
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

Walter Wong wrote:
> 
> Can anyone correct me if I am wrong.
> 

> This line       *a++ = *b++
> same as a++; b++;
>         *a = *b

Heavens, no.
	*a++ = *b++;
Should be roughly equivalent to
	*a = *b, a++, b++;
except that the actual point at which the increments occur is a little
less well defined, and the value of '*a++ = *b++;' is the result of the
assignment and the value of '*a = *b, a++, b++;' is the result of 
b++.

-- 
Martin Ambuhl (mambuhl AT earthlink DOT net)
Note: mambuhl AT tiac DOT net will soon be inactive

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019