Every time I add debugging code it works perfectly: every time I remove
it, it stops working....
I think I'm going to watch TV instead.
Every time I add debugging code it works perfectly: every time I remove
it, it stops working....
Every time I add debugging code it works perfectly: every time I remove
it, it stops working....
Every time I add debugging code it works perfectly: every time I remove
it, it stops working....
I think I'm going to watch TV instead.
Yeah - you probably have an access beyond bounds problem - have fun finding it.
Every time I add debugging code it works perfectly: every time I remove
it, it stops working....
Every time I add debugging code it works perfectly: every time I remove
it, it stops working....
I think I'm going to watch TV instead.
--
"Women actually are capable of being far more than the feminists will
let them."
On a sunny day (Tue, 8 Aug 2023 18:35:51 +0100) it happened The Natural Philosopher <tnp@invalid.invalid> wrote in <uatudn$3g3qj$3@dont-email.me>:
Every time I add debugging code it works perfectly: every time I remove
it, it stops working....
Depends
I never use debuggiging code whatver that is
but every subroutine routine I write starts like this:
int connect_to_news_server(char *server, int port)
{
struct hostent *hp;
struct sockaddr_in sa; /* -Wall gets confused */
int a, i;
char temp[TEMP_SIZE];
char dotted_quad[TEMP_SIZE];
int flags;
time_t connect_timer;
extern int idle_cb();
int connect_flag;
unsigned long in;
int byname;
if(debug_flag)
{
fprintf(stdout, "connect_to_news_server(): arg server=%s port=%d\n",\
server, port);
}
/* argument check */
if(! server) return(0);
if(port <= 0) return(0);
So if I specify -v on the command line that sets 'debug_flag' and shows what is happening everywhere
If I just comment out the 'if(debug_flag)' it shows what's happening with / in that specific
routine.
If -v specified then with any argument error it wil exit with the last routine where it failed
Usually only takes a second to find a fault.
Every time I add debugging code it works perfectly: every time I remove
it, it stops working....
I think I'm going to watch TV instead.
The only true bug I ran into was a precedence thing something like if(g=function(h) >0) where I forgot that assignment is a lower
priority than comparison...
int connect_to_news_server(char *server, int port)
{
struct hostent *hp;
struct sockaddr_in sa; /* -Wall gets confused */
int a, i;
char temp[TEMP_SIZE];
char dotted_quad[TEMP_SIZE];
int flags;
time_t connect_timer;
extern int idle_cb();
int connect_flag;
unsigned long in;
int byname;
if(debug_flag)
{
fprintf(stdout, "connect_to_news_server(): arg server=%s
port=%d\n",\
server, port);
}
Sysop: | Coz |
---|---|
Location: | Anoka, MN |
Users: | 2 |
Nodes: | 4 (0 / 4) |
Uptime: | 140:09:30 |
Calls: | 166 |
Files: | 5,389 |
Messages: | 223,236 |