Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » Extra libraries, Code snippets, applications etc. » C++ language problems and code snippets » What does , means?
Re: What does , means? [message #15131 is a reply to message #15130] Wed, 02 April 2008 09:56 Go to previous messageGo to previous message
mr_ped is currently offline  mr_ped
Messages: 826
Registered: November 2005
Location: Czech Republic - Praha
Experienced Contributor
http://msdn2.microsoft.com/en-us/library/zs06xbxh.aspx

It works similar to ";", but the whole sequence up to ";" is considered as single expression to compiler.
(handy especially in for statements, where you can do increment of two variables like this for ( ... ; ... ; ++var1, ++var2 ) ... but don't overuse it, it decreases the readability of code)

That said the "angle, angle, font.IsBold() ? FW_BOLD : FW_NORMAL" part looks useless to me, as it will produce 3 values (2x "angle" value, and once FW_BOLD or FW_NORMAL), which are not assigned anywhere, what makes them useless.

So you either put that line out of context and it is in reality parsed differently, or you have some very weird piece of code.
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Optimized memcmp for x86
Next Topic: THISBACK and function-overloading
Goto Forum:
  


Current Time: Mon Aug 18 19:19:11 CEST 2025

Total time taken to generate the page: 0.10179 seconds