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 » U++ Library support » U++ Library : Other (not classified elsewhere) » Print unwanted copy
Re: Print unwanted copy [message #44073 is a reply to message #44069] Mon, 22 December 2014 16:29 Go to previous messageGo to previous message
Klugier is currently offline  Klugier
Messages: 1100
Registered: September 2012
Location: Poland, Kraków
Senior Contributor
Hello Forlano,

For me this code look strange (PrinterJob - Windows code - line 102):
for(int c = 0; c < ((dlg.Flags & PD_COLLATE) ? dlg.nCopies : 1); c++)
	for(int i = dlg.nFromPage - 1; i <= dlg.nToPage - 1; i++)
		for(int c = 0; c < ((dlg.Flags & PD_COLLATE) ? 1 : dlg.nCopies); c++)
			page.Add(i);


Double "c" definitions in loop is definitely not good idea.

And why for the one condition there is different result:
(dlg.Flags & PD_COLLATE) ? dlg.nCopies : 1)
(dlg.Flags & PD_COLLATE) ? 1 : dlg.nCopies)


Sincerely,
Klugier


U++ - one framework to rule them all.

[Updated on: Mon, 22 December 2014 16:29]

Report message to a moderator

 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: [Fixed] TURTLE+MT fails to link: bug or feature?
Next Topic: How to check internet availability?
Goto Forum:
  


Current Time: Sun Jul 06 13:46:37 CEST 2025

Total time taken to generate the page: 0.03691 seconds