Delphi Pages Forums  

Go Back   Delphi Pages Forums > Delphi Forum > General

Lost Password?

Reply
 
Thread Tools Display Modes
  #1  
Old 07-15-2012, 05:14 PM
Petros Petros is offline
Junior Member
 
Join Date: Jul 2012
Posts: 3
Default CSV and function

Hi everybody ,

I am a very new user of delphi (only 3 weeks ) and I need hlep for a problem that I have with my code.

I have a csv file with some data which I converted it into a string and then to an array.

So I imported the values of my array in my function and it is working

petros1 := GetPetros (Garray1[1,0],Garray1[2,0],Garray1[3,0],Garray1[4,0],Garray1[5,0] );

which takes the values of the first row and returns me a value.

Now I want to repeat that for all rows and I have a problem doing it.
Reply With Quote
  #2  
Old 07-15-2012, 05:47 PM
Jasser Jasser is offline
Moderator
 
Join Date: Jan 2005
Location: Saudi Arabia
Posts: 4,831
Default

The next link contains two ways of doing it. If the text file is big (> 1MB) use the first function (GrabLine), otherwise use the second function (GrabLine2) simply because it is short.

http://www.swissdelphicenter.ch/en/showcode.php?id=1628
__________________
Regards,
Abdulaziz Jasser

Last edited by Jasser; 07-15-2012 at 05:51 PM.
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is On

Forum Jump


All times are GMT. The time now is 01:09 PM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.