Re: printf on alcohol
In article <1192748632.436515.173000@q5g2000prf.googlegroups. com>,
<estantep@gmail.com> wrote:
>Has anybody ever seen a thing like this?
>### code:
>double link_bw_cost(int a, int b){
> double ro;
> ro = ( (double) link_usage[a][b].bandw / (double) link[a][b].bandw);
>printf("DEBUG - a = %d e b = %d\n", a, b);
>printf("DEBUG - link_usage[%d][%d].bandw = %ld link[%d][%d].bandw
>= %ld \n", a, b, link_usage[a][b].bandw, a, b, link[a][b].bandw);
>### when running:
>DEBUG - a = 0 e b = 2
>DEBUG - link_usage[0][2].bandw = 0 link[1078689792][0].bandw = 2
Yes, I've seen things like that when link_usage[a][b].bandw is wider
than a long (%ld). You didn't happen to supply us with the structure
definition, so we can't tell for sure.
--
"I will speculate that [...] applications [...] could actually see a
performance boost for most users by going dual-core [...] because it
is running the adware and spyware that [...] are otherwise slowing
down the single CPU that user has today" -- Herb Sutter
|