home *** CD-ROM | disk | FTP | other *** search
- on readtextfile fileName, champ, Okchrde10
- global fileioobject, PathFile
- set PathFile to the pathName & "fileio.dll"
- openXLib(PathFile)
- if objectp(fileioobject) then
- fileioobject(mdispose)
- end if
- set fileioobject to fileio(mnew, "read", fileName)
- set numberobject to abs(fileioobject)
- if numberobject > 32 then
- fileError(fileioobject)
- else
- put fileioobject(mReadFile) into field champ
- if Okchrde10 = "OK" then
- set IncrChar to 1
- set IncrLine to 2
- set NumberOfLine to the lineCount of member champ
- repeat while (NumberOfLine - 1) > 0
- delete char IncrChar of line IncrLine of field champ
- set IncrLine to IncrLine + 1
- set NumberOfLine to NumberOfLine - 1
- end repeat
- end if
- fileioobject(mdispose)
- end if
- end
-