Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Do level exceeded error
Message
From
17/10/2001 14:58:13
Leshel Rich
Plains Cotton Coop Assoc
Lubbock, Texas, United States
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Do level exceeded error
Miscellaneous
Thread ID:
00569846
Message ID:
00569846
Views:
51
Can someone offer any suggestions on how to clean up this code? My problem is that the customer number can have more than the allowed do nesting level occurrances of a specific sales order number. Below is the code for my DO WHILE. Note that the code is in a function called l_upddtl, and this code is calling that function, so there is a recursive call to that function within itself. HELP!!!
*-- Scan through all item in sales order
DO WHILE a_tmpf1->sono + a_tmpf1->custno = lc_cmpsono + lc_cmpcust AND ;
NOT Cl_CmpDone

*-- Update record number in array
la_shipcmp[Cn_CurRec] = RECNO()

*-- Update gets and set validation flags
= w_browse()

*-- Validate item
IF l_upddtl(.t.)
*-- Record is valid and has been saved
SKIP

*-- Store new position to ship complete array
la_shipcmp[Cn_CurRec] = RECNO()

IF EOF("a_tmpf1")
*-- End of file, complete shipment is done
la_shipcmp[Cn_Done] = .t.
ll_return = .t.

*-- Skip back one to position on last item of Sales Order
SKIP -1
ELSE

*-- Check if complete shipment is done
IF la_shipcmp[Cn_SavSono] <> a_tmpf1->sono
*-- We are are on a different sales order, complete is done
la_shipcmp[Cn_Done] = .t.
ll_return = .t.

*-- Skip back one to position on last item of Sales Order
SKIP -1

ENDIF

ENDIF


ELSE
ll_return = .f.

*-- Exit, so we can correct invalid get
EXIT
ENDIF

ENDDO

Thanks!
Next
Reply
Map
View

Click here to load this message in the networking platform