Computer Science Canada i need help! i need to put data into arrays in a loop |
Author: | r0ssar00 [ Sat Oct 16, 2004 4:08 pm ] | ||
Post subject: | i need help! i need to put data into arrays in a loop | ||
a little bit of a problem... the code is this and the required files are already opened with get access
my problem is that it always errs on line 6, can anyone help? err = "invalid integer input" basically what im doing is taking info line by line from one file and putting it into a_storage and then taking info line by line from a second file and putting it into b_storage the count is so that i can stop the get when i reach the max numberOfUsers which is whatever i specify |
Author: | wtd [ Sat Oct 16, 2004 5:53 pm ] |
Post subject: | |
You need to show us all of the code. |
Author: | r0ssar00 [ Mon Oct 18, 2004 9:33 am ] |
Post subject: | |
all you need is that because that is the whole part that relates to the problem, everything else works, if i were to give you the rest of the code, my idea would not be as original, all you need is that part, i do not plan o selling this or anything, i just want this to remain original until i release it, i hope thats alright with evry1, even if i were to post it in this post, i couldn't, the code is at home and im writing this at school |
Author: | Tony [ Mon Oct 18, 2004 9:49 am ] |
Post subject: | |
Quote: var count:int:=1 loop exit when count = numberOfUsers count += 1 get : fileNmb, a_storage (count) 1 + 1 = 2 ! that's the first entry you read... 2nd that might be a problem |
Author: | DanShadow [ Mon Oct 18, 2004 10:50 am ] | ||
Post subject: | |||
Ive seen problems like that before...Id suggest just instead of reading integers, read string's. Then use the 'strint' command when you have read those...you can transfer them to integers.
Ok....I cant do the second loop, as I dont know if 'pass_storage' is an integer or string. And yes, you should post the rest of your code if you want it accurately examined. But if your afraid of somebody stealing your code, PM one of the Turing Moderators (aka me,Asian Sensation, etc.) with your code, and your question. (Note: DO NOT ask for the answers. I cant stress that enough, lol. Ask 'how' you might come to a conclusion, or for help. I know you didnt ask for the answers, but im just pointing that out.) And believe, none of the moderators of CompSci would have any purpose of stealing your code. (As they could create better. ) Anyways, I hope the 'strint' idea works for you, good luck. |
Author: | r0ssar00 [ Tue Oct 19, 2004 9:45 am ] |
Post subject: | |
sorry, typo: pass_storage is supposed to b_storage, but i would do the same thing as in a_storage, correct, i hope so |