Computer Science Canada Records being annoying |
Author: | Tallguy [ Thu Apr 30, 2009 7:57 am ] |
Post subject: | Records being annoying |
So i'm doing a records assignment. I store the data within a sequntial file into an array. the user choose the data to be shown, then it is outputted. but it works fine sometimes and not other times. i can search the name without problem it's just the tv show that doesn't work although "the simpsons" work Anyone have suggestions? This is my assingment Quote: 4. Copy and Modify the program "cartoon.t" below. Currently there are five fields: the name of the character, the network on which the cartoon is shown, the rating, the name of the cartooon show and the year the cartoon came into existence. Add the search feature to the program. Using either the name of the cartoon character or the nane of the show the character appears, do a search for the particular data. If no match is found, communicate this to the user. Save as lastname_firstname record#4.t. |
Author: | corriep [ Thu Apr 30, 2009 2:36 pm ] |
Post subject: | RE:Records being annoying |
How would you approach this with strings instead of records? Its basically the same thing. Also, why are you using a forward and body procedure when you only need a normal procedure. |
Author: | Tallguy [ Thu Apr 30, 2009 4:51 pm ] |
Post subject: | RE:Records being annoying |
i'm doing it exactly the way i would with strings, it just doesn't work for "the jetsons" and "the flintstones", everything else works fine.i have no idea why its being gay body proc because it goes back to main, and because i like them anyone can help me? |
Author: | zero-impact [ Thu Apr 30, 2009 5:39 pm ] |
Post subject: | RE:Records being annoying |
The problem is your input file. You have a bunch of trailing spaces after some of the names which turing is reading as part of the name. Just go into your text file and delete those spaces and you should be fine ![]() |