Need to open and read text file.

General Help regarding HMG, Compilation, Linking, Samples

Moderator: Rathinagiri

User avatar
apais
Posts: 441
Joined: Fri Aug 01, 2008 6:03 pm
DBs Used: DBF, Leto, MariaDB, SQLite
Location: uruguay
Contact:

Re: Need to open and read text file.

Post by apais »

Optimization tip:

Procedure Main
buffer := space(4096)
ParseIt(buffer) // slower because the compiler makes a copy of buffer AND WORK DONE ON THE COPY
ParseIt(@buffer) // no copy is done and work is done on original string

funtionc parseit( cString )
... do somethjig with cString
RETURN lSuccess

HTH
Angel
Angel Pais
Web Apps consultant/architect/developer.
User avatar
Rathinagiri
Posts: 5482
Joined: Tue Jul 29, 2008 6:30 pm
DBs Used: MariaDB, SQLite, SQLCipher and MySQL
Location: Sivakasi, India
Contact:

Re: Need to open and read text file.

Post by Rathinagiri »

Very nice suggestion. Thank you.
East or West HMG is the Best.
South or North HMG is worth.
...the possibilities are endless.
User avatar
esgici
Posts: 4543
Joined: Wed Jul 30, 2008 9:17 pm
DBs Used: DBF
Location: iskenderun / Turkiye
Contact:

Re: Need to open and read text file.

Post by esgici »

Viva INTERNATIONAL HMG :D
NickSteel
Posts: 67
Joined: Mon May 27, 2013 10:44 pm

Re: Need to open and read text file.

Post by NickSteel »

esgici wrote:
NickSteel wrote:My source file.
viewtopic.php?f=33&t=2941&p=26454&hilit ... ead#p26454
Thanks. I can read the file now, line by line into a buffer. Now trying to parse the tab deliminated data.
User avatar
esgici
Posts: 4543
Joined: Wed Jul 30, 2008 9:17 pm
DBs Used: DBF
Location: iskenderun / Turkiye
Contact:

Re: Need to open and read text file.

Post by esgici »

NickSteel wrote:...Now trying to parse the tab deliminated data.
Convert tab separated text file to CSV
Convert tab separated text file to CSV
Xer2cvs.JPG (71.08 KiB) Viewed 4491 times
Xer2csv.zip
Convert tab separated text file to CSV (source)
(986 Bytes) Downloaded 442 times
Happy HMG'ing :D
Viva INTERNATIONAL HMG :D
User avatar
danielmaximiliano
Posts: 2716
Joined: Fri Apr 09, 2010 4:53 pm
Location: Argentina
Contact:

Re: Need to open and read text file.

Post by danielmaximiliano »

Very good Esgici !!
*´¨)
¸.·´¸.·*´¨) ¸.·*¨)
(¸.·´. (¸.·` *
.·`. Harbour/HMG : It's magic !
(¸.·``··*

Saludos / Regards
DaNiElMaXiMiLiAnO

Whatsapp. := +54901169026142
Telegram Name := DaNiElMaXiMiLiAnO
User avatar
srvet_claudio
Posts: 2224
Joined: Thu Feb 25, 2010 8:43 pm
Location: Uruguay
Contact:

Re: Need to open and read text file.

Post by srvet_claudio »

esgici wrote:
NickSteel wrote:...Now trying to parse the tab deliminated data.
Xer2cvs.JPG
Xer2csv.zip
Happy HMG'ing :D
Very nice Brother!!!
This Class support Unicode ?
Best regards.
Dr. Claudio Soto
(from Uruguay)
https://srvet.blogspot.com
User avatar
esgici
Posts: 4543
Joined: Wed Jul 30, 2008 9:17 pm
DBs Used: DBF
Location: iskenderun / Turkiye
Contact:

Re: Need to open and read text file.

Post by esgici »

NickSteel wrote:What is easy way to display the array?
You may try this too.

Not innovative, quit old; but as far as simple and playable ;)

Happy HMG'ing :D
Viva INTERNATIONAL HMG :D
User avatar
esgici
Posts: 4543
Joined: Wed Jul 30, 2008 9:17 pm
DBs Used: DBF
Location: iskenderun / Turkiye
Contact:

Re: Need to open and read text file.

Post by esgici »

Thanks amigo.
srvet_claudio wrote:This Class support Unicode ?
Sadly no :( ( quite old )

But source is available into Harbour package; I can send you if you want.
Viva INTERNATIONAL HMG :D
User avatar
srvet_claudio
Posts: 2224
Joined: Thu Feb 25, 2010 8:43 pm
Location: Uruguay
Contact:

Re: Need to open and read text file.

Post by srvet_claudio »

esgici wrote:Thanks amigo.
srvet_claudio wrote:This Class support Unicode ?
Sadly no :( ( quite old )

But source is available into Harbour package; I can send you if you want.
Ok Friend, no problem.
Best regards.
Dr. Claudio Soto
(from Uruguay)
https://srvet.blogspot.com
Post Reply