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 #44075 is a reply to message #44073] Mon, 22 December 2014 18:30 Go to previous messageGo to previous message
forlano is currently offline  forlano
Messages: 1185
Registered: March 2006
Location: Italy
Senior Contributor
Klugier wrote on Mon, 22 December 2014 16:29
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


Hello Klugier,

it looks like there is a double loop... the quadratic relation I was speaking about.
I do not know which to remove.
Mirek should know what to do Rolling Eyes

Thanks,
Luigi
 
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: Sat Apr 27 00:16:52 CEST 2024

Total time taken to generate the page: 0.71475 seconds