Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Programming > C Moderated > Re: Program han...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 2 of 7 Topic 1072 of 1133
Post > Topic >>

Re: Program hangs with no output

by Kenneth Brody <kenbrody@[EMAIL PROTECTED] > Apr 4, 2008 at 10:34 AM

David Given wrote:
> 
> Okay, I've been staring at this for hours now, and I've no idea what's
> going wrong. I'm pretty sure I'm doing everything right --- everything
> here is pretty straightforward C89, and the algorithms are dead simple,
> but it simply hangs solid using all the CPU about half-way through. It's
> not just slow --- I've let it run for a while and nothing whatsoever
> happens. Any suggestions?
[...]
> focus_t focus;
[...]
> static void updatechant()
> {
[... code which doesn't touch "focus" ...]
> }
> 
> int main(int argc, const char* argv[])
> {
>   int i;
[...]
>   do
>   {
>     for (i = 0; i < sizeof(spiritname)-1; i++)
>     {
>       focus.invocation = rot13(spiritname[i]);
>       updatechant();
>     }
>   }
>   while (focus.target == 0);
[...]

When will focus.target no longer be zero?

-- 
+-------------------------+--------------------+-----------------------+
| Kenneth J. Brody        | www.hvcomputer.com | #include              |
| kenbrody/at\spamcop.net | www.fptech.com     |    <std_disclaimer.h> |
+-------------------------+--------------------+-----------------------+
Don't e-mail me at: <mailto:ThisIsASpamTrap@[EMAIL PROTECTED]
>
-- 
comp.lang.c.moderated - moderation address: clcm@[EMAIL PROTECTED]
 -- you must
have an appropriate newsgroups line in your header for your mail to be
seen,
or the newsgroup name in square brackets in the subject line.  Sorry.
 




 7 Posts in Topic:
Program hangs with no output
David Given <dg@[EMAIL  2008-04-01 12:17:08 
Re: Program hangs with no output
Kenneth Brody <kenbrod  2008-04-04 10:34:10 
Re: Program hangs with no output
Jack Klein <jackklein@  2008-04-04 10:35:01 
Re: Program hangs with no output
Barry Schwarz <schwarz  2008-04-04 10:35:08 
Re: Program hangs with no output
Jens Schweikhardt <use  2008-04-04 10:35:15 
[comp.lang.c.moderated] Re: Program hangs with no output
Val <Valery_Creux@[EMA  2008-04-04 10:35:19 
Re: Program hangs with no output
dwolffxx@[EMAIL PROTECTED  2008-04-04 10:35:36 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Thu Jul 24 2:30:31 CDT 2008.