Programming C, C++, Java, PHP, Ruby, Turing, VB
Computer Science Canada 
Programming C, C++, Java, PHP, Ruby, Turing, VB  

Username:   Password: 
 RegisterRegister   
 Reading Data From a File
Index -> Programming, Turing -> Turing Help
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh pageAdd this topic to your bookmarks (CTRL-D) View next topic
Author Message
Danjen




PostPosted: Sat Oct 11, 2008 6:26 pm   Post subject: Reading Data From a File

I am familiar with the commands used to work with files. However, I saved a bunch of data for my program in a tab delimited spreadsheet, and I don't know how to make the program know where some data ends and another begins.
 
Sponsor
Sponsor
Sponsor
sponsor
andrew.




PostPosted: Sun Oct 12, 2008 2:36 pm   Post subject: RE:Reading Data From a File

Hmm...I am not sure if Turing can use spreadsheets. I know that I used file I/O to load a text file with each piece of information on the next line. If you want, check out the file I/O tutorial.
 
Insectoid




PostPosted: Sun Oct 12, 2008 9:00 pm   Post subject: RE:Reading Data From a File

don't save to spreadsheets. Save to a text or in file. Then retrieve in a linear fashion. No searching for information or anything. Just load everything in a record array a you're good to go!
 
Danjen




PostPosted: Mon Oct 13, 2008 9:44 pm   Post subject: RE:Reading Data From a File

It was a spreadsheet saved as a tab delimited text file... If you ever made a mod for say, Diablo II, you would know the file structure I was trying to use.

Regardless, rather than storing data horizontally in a file, I'll just have to store it vertically, and make it a bajillion lines long. Thanks! Smile
 
SNIPERDUDE




PostPosted: Tue Oct 14, 2008 6:53 am   Post subject: RE:Reading Data From a File

It doesn't necessarily have to be spread all vertically...
When I made map files for my games I would use a character like '|' to separate lines.Then when I retrieved the info it would first go to a temp string, which is then sorted appropriately.

It may be possible for your to use the spreadsheet, but I've never tried it.
 
Display posts from previous:   
   Index -> Programming, Turing -> Turing Help
View previous topic Tell A FriendPrintable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh pageAdd this topic to your bookmarks (CTRL-D) View next topic

Page 1 of 1  [ 5 Posts ]
Jump to:   


Style:  
Search: