March 29, 2024, 01:23:27 AM

News:

IonicWind Snippit Manager 2.xx Released!  Install it on a memory stick and take it with you!  With or without IWBasic!


Loop problem

Started by Pip1957, August 09, 2006, 06:26:06 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Pip1957

Paul updated to last release and have a problem with the for loop the code below is in the OnInitDialog section

This does not work:

for(nd=100; nd>110; nd++)
{
ShowWindow(SWHIDE,nd);
setfont("Arial",9,600,0,nd);
}


But This does:

nd=100;
do
{
ShowWindow(SWHIDE,nd);
setfont("Arial",9,600,0,nd);
nd++;
}Until nd>110;

John Syl.

The condition expression nd>110 is not true therfore the loop fails it should be nd < 111.

John
Intel 3.6 p4 ht, XP home,2 gb mem, 400 gb hd 20gb raid 0, Nvidia 6600le.
AMD k6-2 500, 40gb.

Started on PDP11 Assembler, BASIC, GWBASIC, 6502, Z80, 80x86, Java, Pascal, C, C++, 
IBasic (std & pro), Aurora, EBasic.  (Master of none, but it's been fun!)

Pip1957

Cheers Puddytat could not see the wood for the trees. ::)