Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Emulating Visual Foxpro Command Window
Message
De
03/08/2000 20:33:04
 
 
À
02/08/2000 03:36:42
Walter Meester
HoogkarspelPays-Bas
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Divers
Thread ID:
00399066
Message ID:
00400807
Vues:
23
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
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform