TIP: Click on subject to list as thread! ANSI
echo: os2prog
to: Edwin Groothuis
from: Joel Donelson
date: 1994-07-22 20:28:20
subject: Code has no effect-warning

... Edwin Groothuis said across the room to All ...

 EG> on these lines:

 EG> 29: for (i=0;i<10;i++)
 EG> 30:   if (strcmp(Address[i],"")!=0)
 EG> 31:     WinInsertLboxItem(hwndLb,LIT_END,Address[i]);

 for (i=0;i<10;i++) {
     if (strcmp(Address[i],"")!=0)
         WinInsertLboxItem(hwndLb,LIT_END,Address[i]);
 } /* end for */

    You might also want to try, for a bit less overhead,

    if(Address) {  /* Address not NULL? */
    ...
    }

 EG> 48: for (i=0;i 49:     WinQueryLboxItemText(hwndLb,i,Address[i],sizeof(Address[i]));

    Again, try the {} in for loops. I've found that if's are usually OK,
    but for's need the brackets. In my experience, that is.

 EG> 72: hwndLb=WinWindowFromID(hwnd,DLG_SETUP_LISTBOX);
 EG> 73: index=WinQueryLboxSelectedItem(hwndLb);
 EG> 74: WinQueryLboxItemText(hwndLb,index,s,sizeof(s));

    Not sure about these. I have seen some anomalies from Borland, like
    the program compiles/links clean, but when you run it, it just comes
    back to the command prompt. Loading it with printf's showed that it
    wasn't getting past the first call of the first routine. I will be
    trying to switch to Watcomm in the very near future. I also use BC
    1.0 at the moment. I'm sick of it. I bought 1.0 about 10 days before
    1.5 shipped, and I was told $99.00 to upgrade. Boo.

    On the Narrow Path...
    Joel

... God even created microwaves...
--- Blue Wave/Max v2.12 OS/2

* Origin: The Sword of the Spirit! * On the Narrow Path! * (1:323/146)
SEEN-BY: 12/2442 54/54 620/243 624/50 632/348 640/820 690/660 711/409 413 430
SEEN-BY: 711/807 808 809 934 942 712/353 623 713/888 800/1
@PATH: 323/146 1012 3615/50 229/2 12/2442 711/409 54/54 711/808 809 934

SOURCE: echomail via fidonet.ozzmosis.com

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.