PROFESSIONAL NEWSGROUPS
WINDEV
,
WEBDEV
and
WINDEV Mobile
Home
|
Recent messages
|
Connect
|
Sign out
|
English
Home
→
WINDEV Mobile 2024
→
Read Txt AscII - LE_ASCII
Read Txt AscII - LE_ASCII
Started by adrianoboller, Nov., 18 2014 2:29 PM - No answer
Connect yourself…
adrianoboller
#1
Registered member
3,660 messages
Popularité : +175 (223 votes)
Posted on November, 18 2014 - 2:29 PM
Procedure
LE_ASCII
(
LOCAL
ArquivoTxt
)
//Le arquivo texto
// Declare the variables
PathFile is
string
=
ArquivoTxt
IdFile
,
ResCloseFile
,
FileID
,
NumeroLinha is
int
Line is
string
// Open the file
FileID
=
fOpen
(
PathFile
,
foReadWrite
)
IF
IdFile
= -
1
THEN
Error
(
ErrorInfo
(
errMessage
)
)
ELSE
//Converte de Unicode para Ansi
Line
=
UnicodeToAnsi
(
fReadLine
(
FileID
)
)
//Linha 1
NumeroLinha
=
1
//Info("Linha:" + NumeroLinha, Line)
WHILE
Line
<
>
EOT
AND
Line
<
>
""
//Proxima linha
NumeroLinha
+
=
1
Line
=
fReadLine
(
FileID
)
//Info("Linha:" + NumeroLinha, Line)
END
IF
Line
=
""
THEN
Error
(
ErrorInfo
(
errMessage
)
)
IF
Line
=
EOT
THEN
Info
(
"Final do Arquivo."
)
ResCloseFile
=
fClose
(
IdFile
)
IF
ResCloseFile
= -
1
THEN
//Error(ErrorInfo(errMessage))
END
END
Report
0
0
→ Go back to WINDEV Mobile 2024
WINDEV 2024
WEBDEV 2024
WINDEV Mobile 2024
WINDEV (earlier versions)
Français
English
Español
Portuguesa
Close this window
Search type
Only topics
All the messages
Search period
Any time
Past hour
Past 24 hours
Past week
Past month
Past year
Cancel
Preview of your message
Adding an image
Import an image from a URL
Send an image from a file of your disk
Drop a file or click "Browse..."
or
Cancel
0%
WLanguage
SQL
XML, HTML
JAVA, Javascript
Text