Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Emulating Visual Foxpro Command Window
Message
From
03/08/2000 20:33:04
 
 
To
02/08/2000 03:36:42
Walter Meester
HoogkarspelNetherlands
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00399066
Message ID:
00400807
Views:
16
Hi Walter
THank you again for you help.
I think the cause of the infinite loop problem in your code was the following block:

* Remove space and return characters from the beginning of the command if there.
nT = nT + 1
DO WHILE (INLIST(SUBSTR(THIS.Text,nT,1), CHR(13), CHR(10), " ") OR nT < 1)
nT = nT + 1
ENDDO

Imagine If I type 'Enter' key as the first command in your command window it will run forever and hang up the computer.
To fix, I think you can check the number of continuous Entery key (Chr(13)) in DO..ENDDO and exit the loop if 2 Enter
keys were pressed. Sth like the following:

nT = nT + 1
DO WHILE (INLIST(SUBSTR(THIS.Text,nT,1), CHR(13), CHR(10), " ") OR nT < 1) AND numberofchar13 < 2
nT = nT + 1
IF INLIST(SUBSTR(THIS.Text,nT,1), CHR(13))
numberofchar13 = numberofchar13 + 1
ENDIF
ENDDO

Hope this makes sense.

THanks
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform