Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Where's the Nesting Error?
Message
From
19/01/2005 11:13:23
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Where's the Nesting Error?
Environment versions
Visual FoxPro:
VFP 7 SP1
OS:
Windows XP SP2
Database:
Visual FoxPro
Miscellaneous
Thread ID:
00978580
Message ID:
00978580
Views:
50
Can anyone tell me where the hell the nesting error is in the following code? The compiler complains at the 2 ENDDOs. It was fine before. All I did (this time) was comment out the original 2 DO WHILEs and replace them with new versions. Plus any code commented out with 23/12/04. If I take the commented out do whiles, and place them outside the main code, then it complains at the ENDWITH!!!

It's doing my head in!

I'd sure 'ppreciate it.

Terry
LPARAMETERS tnZoneNo
LOCAL	   I, lnZLCount, lnZBCount, llEOList, lnLenZoneList

* See how many times, if any, current zone no. appears both in the ZONELIST tables
* and in a list of zone nos in current QO/I/T batch.
* If it appears more in the batch than in zonelist then flag that it can be added - else that it can't
* ___________
* 23/12/04 *  Do While I < 111 ;					&& 23/12/04
With thisform
  Store 0 To lnZLCount, lnZBCount
  
  llEOList	= .F.		&& ie not at end of list
  I		= 1
  lnLenZoneList	= ALEN( .aZoneList, 1)		&& 23/12/04
* 23/12/04 *  Do While I < 111 ;			&& 23/12/04
  Do while I <= lnLenZoneList ;
     and   not llEOList 				&& tabs on ZONELIST rec
    If .aZoneList( I) = 0
*TPMcD*	    If EMPTY( .aZoneList( I))
    	llEOList	        = .T.
    Else
    	If .aZoneList( I) = tnZoneNo
*TPMcD*	    If ALLTRIM( .aZoneList( I)) == ALLTRIM( tcStopNo)
    	    lnZLCount    = lnZLCount + 1
    	Endif 
    	I	        = I + 1
    Endif 
  EndDo
  
  llEOList	       = .F.		&& ie not at end of list
  I		       = 1
* 23/12/04 *  Do While I < 111 ;			&& 23/12/04
  Do while I <= lnLenZoneList ;
  	 and   not llEOList			&& tabs on zones we're trying to add
    If .aZoneBatch( I)   = 0
*TPMcD*	    If EMPTY( .aZoneBatch( I))
    	llEOList	= .T.
    Else
    	If .aZoneBatch( I) = tnZoneNo
*TPMcD*	    If  ALLTRIM( .aZoneBatch( I)) == ALLTRIM( tcStopNo)
    	    lnZBCount  = lnZBCount + 1
    	Endif 
    	I	      = I + 1
    Endif 
  EndDo
Endwith 

Return lnZBCount > lnZLCount 		&& If more in inport list than already in ZONELIST can put in 
- Whoever said that women are the weaker sex never tried to wrest the bedclothes off one in the middle of the night
- Worry is the interest you pay, in advance, for a loan that you may never need to take out.
Next
Reply
Map
View

Click here to load this message in the networking platform