Re: [Vala] Why the temporary variables in the C code are usefull ?
- From: Jim Peters <jim uazu net>
- To: Jacques-Pascal Deplaix <jp deplaix gmail com>
- Cc: vala-list <vala-list gnome org>
- Subject: Re: [Vala] Why the temporary variables in the C code are usefull ?
- Date: Thu, 7 Jul 2011 12:09:16 -0500
Jacques-Pascal Deplaix wrote:
What are the side effects corrected by the temporary variables ?
Unwanted side effects can happen if you evaluate an expression more
than once, e.g. if you substituted the full expression for every
_tmp2_ in the C code. Expressions with side-effects include function
calls and stuff which modifies variables, e.g. p++. You don't want to
do 'p++' twice or call the function twice.
As the other poster said, C compilers are very good at optimising away
Jim Peters (_)/=\~/_(_) jim uazu net
(_) /=\ ~/_ (_)
Uazú (_) /=\ ~/_ (_) http://
in Peru (_) ____ /=\ ____ ~/_ ____ (_) uazu.net
] [Thread Prev