Welcome To The Home Of The Visual FoxPro Experts  
home. signup. forum. archives. search. google. articles. downloads. faq. members. weblogs. file info. rss.
 From: Martin Ruhland
  Where is Martin Ruhland?
 East Aurora
 New York - United States
 Martin Ruhland
 Tags
Subject: VFP 9 Errors on valid programming statem
Thread ID: 240109 Message ID: 240109 # Views: 19 # Ratings: 0
Version: Visual FoxPro 9 SP2 Category: Errors & Debugging
Date: Thursday, September 10, 2009 4:51:47 PM         
   


Help!!!

I just recently upgraded to VFP 9 from 6 because a piece of programming that I'm working with is too large for the VFP 6 compiler. It is 117,200 bytes and compiles to 92,125 bytes. When I run this program now, a portion of it that worked just fine before I exceeded the VFP compiler limit now gives me an error (command contains unrecognized prase/keyword).

This is the code snippet that errors: (the error occurs when it hits the very first case statement).

SELECT dataentry
FOR cnt = 1 TO 10
SELECT dataentry
fld = "dataentry.product"+PADL(ALLTRIM(STR(cnt)),2,"0")
DO CASE
CASE LEFT(&fld,2) = "01"
m.acce = VAL(SUBSTR(&fld,3,8))
m.acce_p = VAL(SUBSTR(&fld,11,9))
CASE LEFT(&fld,2) = '02' &&ally
m.ally = VAL(SUBSTR(&fld,3,8))
m.ally_p = VAL(SUBSTR(&fld,11,9))
CASE LEFT(&fld,2) = '03' &&assure II
m.assu = VAL(SUBSTR(&fld,3,8))
m.assu_p = VAL(SUBSTR(&fld,11,9))
CASE LEFT(&fld,2) = " "
EXIT
ENDCASE
ENDFOR

When I run this small section all by itself, it runs just fine. But within the larger program it gives me an error.

Also, If I change the program as follows it works fine but the program then gives me another unexplainable error later in the program:

SELECT dataentry
FOR cnt = 1 TO 10
SELECT dataentry
fld = "dataentry.product"+PADL(ALLTRIM(STR(cnt)),2,"0")
fldval = &fld
DO CASE
CASE LEFT(fldval,2) = "01"
m.acce = VAL(SUBSTR(&fld,3,8))
m.acce_p = VAL(SUBSTR(&fld,11,9))
CASE LEFT(fldval,2) = '02' &&ally
m.ally = VAL(SUBSTR(&fld,3,8))
m.ally_p = VAL(SUBSTR(&fld,11,9))
CASE LEFT(fldval,2) = '03' &&assure II
m.assu = VAL(SUBSTR(&fld,3,8))
m.assu_p = VAL(SUBSTR(&fld,11,9))
CASE LEFT(fldval,2) = " "
EXIT
ENDCASE
ENDFOR


What am I missing here? Is there some environmental setting that affects the performance of large programs? If anyone can help with this it would be greatly appreciated.

ENTIRE THREAD

VFP 9 Errors on valid programming statem Posted by Martin Ruhland @ 9/10/2009 4:51:47 PM
RE: VFP 9 Errors on valid programming statem Posted by Borislav Borissov @ 9/10/2009 5:40:46 PM
RE: VFP 9 Errors on valid programming statem Posted by Yuri Rubinov @ 9/10/2009 5:45:28 PM
RE: VFP 9 Errors on valid programming statem Posted by Cetin Basoz @ 9/10/2009 5:56:01 PM
RE: VFP 9 Errors on valid programming statem Posted by Martin Ruhland @ 9/10/2009 6:25:45 PM
RE: VFP 9 Errors on valid programming statem Posted by tushar @ 9/10/2009 6:50:57 PM
RE: VFP 9 Errors on valid programming statem Posted by Martin Ruhland @ 9/10/2009 7:37:12 PM
RE: VFP 9 Errors on valid programming statem Posted by tushar @ 9/10/2009 8:27:20 PM
RE: VFP 9 Errors on valid programming statem Posted by Bernard Bout @ 9/11/2009 3:01:09 AM
RE: VFP 9 Errors on valid programming statem Posted by CHUANBING CHEN @ 3/15/2010 3:36:27 AM