Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
TXT file input as string
Message
From
02/07/2006 00:41:18
Aaron K. Y. Chu
Health & Care Co. Ltd.
Hong Kong, Hong Kong
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Other
Title:
TXT file input as string
Miscellaneous
Thread ID:
01133299
Message ID:
01133299
Views:
56
Dear All,

I have a text file to store the initializing data for the program as follows:
C:\ABC\
C:\ABC\PHOTOS
AARON
FORM_A
I try to use as follows
PUBLIC ARRAY tmpSystem[4]

cStr=ALLTRIM(FILETOSTR("ini.txt"))
nStart = 1
FOR icount = 1 TO 4
        AT_WHERE = AT(CHR(13),cStr,icount)
	nEnd = IIF(at_where=0, LEN(cStr),at_where-1)
	tmpSystem[icount] = SUBSTR(cStr,nstart,nEnd)
	nStart = nEnd + 3
ENDFOR
I don't know is there any way to do this better?
Best regards,

Aaron Chu

********************************************************

Working with Visual FoxPro is a lot of FUN!

********************************************************
Next
Reply
Map
View

Click here to load this message in the networking platform