Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Could not figure out exactly what this code does
Message
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP
Network:
Windows 2003 Server
Database:
MS SQL Server
Divers
Thread ID:
01403230
Message ID:
01403290
Vues:
45
>>>Hi everybody,
>>>
>>>I have the following code
>>>
>>>LOCAL ARRAY slaDir[1],slaADIR[1,5]
>>>
>>>slnDir = 1
>>>slnNumDir = 1
>>>DIMENSION slaDir[1]
>>>slaDir[1] = This.cPjHome
>
>>>DO WHILE slnDir <= slnNumDir
>
>I specifically don't understand this line above

* Apparently the code was taken from recent code having another Iteration of Directories.
* Here however the value of slnDir = 1  and the counter is always one - resulting in only one DO WHILE (no super-directory) 

>
>
>>>	SET DEFAULT TO (slaDir[slnDir])
>>>	DIMENSION slaADIR[1,5]
>>>	slnNumADIR = ADIR(slaADIR,'','D')
>>
>>* Top Node = always cPjHome ref.
>>* Iterate thru all subdirectories (slaADIR), that array will contain "." and ".." --- not wanted
>>
>>>	IF slnNumADIR > 0
>>>		FOR slnFor = 1 TO slnNumADIR
>>>			
>>>			IF LEFT(slaADIR[slnFor,1],1) <> '.'  
>>
>>* Expandable Array (slaADir) is used to hold subdirectory names found in Top Node (slaDir, i.e. cPjHome)
>>
>>>				slnNumDir = slnNumDir+1
>
>                               Here if I try to exclude some directories using my specific condition, how would if affect the top loop - this is the main question I don't understand
>
>
>>>				DIMENSION slaDir[slnNumDir]
>>>				slaDir[slnNumDir] = slaDir[slnDir]+'\'+ALLTRIM(slaADIR[slnFor,1])
>>>			ENDIF
>>>		ENDFOR
>>>	ENDIF
>>>	slnDir = slnDir+1
>>>ENDDO
>>>
>>>which I can not really understand 100%. I want to also exclude certain directories, so if I modify this as
>>>

>>
>>Any Questions?
Edgar L. Bolton, B.S. B.B.A.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform