Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
DIMENSION clear prior array elements
Message
De
03/03/2003 14:22:05
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Problèmes
Titre:
DIMENSION clear prior array elements
Divers
Thread ID:
00760472
Message ID:
00760472
Vues:
43
I have a piece of code that has been running without problem for some time now. I am exporting records from a table to an Excel file type using the COPY command. After this some code elsewhere is creating an array of the program stack using SYS(16) in a FOR...NEXT loop. Now this code (see below) is clearing all of the elements on each DIMENSION and only populates the last element because it is after the DIMENSION.

Has anyone ever seen or know what may be causing it. Nothing strange comes across through debugging and all of the code surrounding this looks ok to me. I have been coding for a long time and have never come across this one.

Lewis

Problem code:

PARAMETERS tuString, tlAll

EXTERNAL ARRAY tuString

LOCAL laStack[1], xx, llFound, lcProgram
FOR xx = 1 TO 128
lcProgram = SYS(16,xx)
IF EMPTY(lcProgram)
EXIT
ENDIF
DIMENSION laStack[xx] <<------- This clears array each time
laStack[xx] = upper(lcProgram)
ENDFOR
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform