| New Post | New Topic |
| Goto page Previous 1, 2, 3 | |
| 05 Feb 2010 05:23:08 pm by john massey | Quote | |
| We were without power for a while. The reason that your program ran was that you have no previous value of OVER1 in your calculator. I have a solution for this problem, I hope, and will run the code and report back | ||
| 05 Feb 2010 08:17:01 pm by john massey | Quote | |||||||
I got an invalid Dim error at the end of OVER1 I never got an output statement. I checked J on the home screen it was 5 so that says that the loop is running. I reset J as shown below, because of the invalid dim error I got no output statement
When I checked OVER1 on the home screen it showed. {1,3,5,7} at this point I am lost. Perhaps the "clearlist OVER1"then "setupeditor OVER1 the code below would not give us an invalid dim error.
|
||||||||
| 05 Feb 2010 09:09:43 pm by EmperorWiggy | Quote | |
| If the For loop executed, J could only be one or two. If J was equal to five when you checked, J must have been five before the For loop began, and it must have encountered an error before the loop began. If the LOver1 was {1,3,5,7}, since there’s no way that code could do that, it probably didn’t execute the line that stores stuff into the list. I'm not sure why you would get an invalid dimension error though. | ||
| 06 Feb 2010 09:53:46 am by john massey | Quote | |||||||||
This is about clearing out old values from preexisting condition of a variable somewhere that makes this program cause errors. This AM I fixed the problem with OVER1 . It now holds
I then went to the Home screen and set and verified that
was valid Now I get a Data Type error at the end of this
|
||||||||||
| 06 Feb 2010 09:45:27 pm by rthprog | Quote | |||||
That "L" in "LTEMP6" is meant to be "⌊". Whenever we're handling lists, the list name is preceeded by that character, but on Cemetech, it is much faster for me to type "L" instead. |
||||||
| 07 Feb 2010 01:11:20 am by john massey | Quote | |||||||||||
This is just a simple test routine where some other code has set the values of TEMPA to {3,5} and OVER1
So to get this code running you need to set these lists to the contents above from your home screen, prior to running this code Just to verify that everything is correct I did this
If you followed my instructions you should see the data that you entered from the home screen. Up to now this is a no brainer, right. So why do I get a data type error at the end of this line of code?
I have read the definition of a data type error. Perhaps the problem is in this
|
||||||||||||
| 08 Feb 2010 07:13:38 am by _player1537 | Quote | |||
have you tried
|
||||
| 08 Feb 2010 08:05:33 am by john massey | Quote | |||||||||||||
I implemented your suggestion, as follows.
I got an invalid dim error after the first line of the code above. I checked
On the home screen and it returned 2 which is correct. TEMPA holds {3,5}
The code above is supposed to change OVER1 which I call first OVER1 shown below
Which I call second OVER1 shown above. This is done by inserting "0s" in second OVER1 where are common values in TEMPA and OVER1 For the definition of DATA TYPE error
I question therefor that this
Is the code above the source of our problem. I ask can anyone independently just test the above line of code or can they just tell me how to fix it or tell me that I am just sniffing glue? |
||||||||||||||
| 08 Feb 2010 06:13:04 pm by EmperorWiggy | Quote | |||
The answer variable was just getting altered, that's all. |
||||
| 08 Feb 2010 07:22:22 pm by john massey | Quote | |
| Emperor,
Given my long post, do you now know what I want to do? If so do you or anyone else have a solution. If this is a dead end. I want to go back to the original problem. If OVER1 is{1,0,3,0,5,0,7,0,0,0,0,0,0,0,0,0} Given that TEMPA is {3,5} before the new code, I want the new value of TEMPA to be {1,0,0,7} that is replacing 3 and 5 with "0s" |
||
| 08 Feb 2010 10:07:49 pm by EmperorWiggy | Quote | |||||
I think something similar to this was said before, but I don't know where.
If LOVER1 equals (1,0,3,0,5,0,7,0,0,0,0} or something similar, and LTEMPA equals {3,5}, LA will equal {1,7}. If you want the answer returned to LTEMPA instead, append this code to the end:
I think I've got a better solution mapped out in my head, but I won't be able to test it until tomorrow when I get new batteries for my TI. If you want, I'll probably be able to convert it to 8xp then too. Ooh, that reminds me. Will all of the elements in LTEMPA always be found in LOVER1? (Basically, in the example above, could LTEMPA be equal to {2,3,5}?) If that's the case the program will only need to be about half as big. |
||||||
| 09 Feb 2010 10:36:16 pm by john massey | Quote | |
| OVER1 is a list of all the problems. TEMPA is a list of problems from OVER1 that were answered correctly. The "0s"in OVER1 are problems that were once answered incorrectly but now are removed from OVER1 when the problem is answered correctly. This removal effort is done by a program that comes after your work and is already done and tested.
I await, with great anticipation, the results of your programming art. |
||
| 10 Feb 2010 06:45:04 pm by EmperorWiggy | Quote | |||
All right, so TEMPA will not have any numbers that OVER1 does not have. That's good, that means I can cut the program down to half size. I'll rename the lists my program uses, paste the code here, and upload it somewhere in .8xp format.
.8xp format I just realized that I left the first two test lines in. Those don't do anything, so you can just delete them. |
||||
| 10 Feb 2010 11:15:18 pm by john massey | Quote | |||
I replaced "N" with "Q" since "N" is in use elsewhere.I left the first two lines in because they are required to independently test. I checked the first 4 lines of code and they were as expected. The last output statements report Q at 5, TA at {3,5} not {1,0,0,7} and OV at {1,3,5,7} Where did I mess up? |
||||
| 11 Feb 2010 11:41:59 am by rthprog | Quote | |||||||
I think you need another set of parenthesis around "LTemp6(X)!=LOVER1(Q)"... Basically, change the above line to
|
||||||||
| 11 Feb 2010 01:51:19 pm by john massey | Quote | |
| rthprog,
Glad to see you again. I made your change & checked it twice but I got the same results. Shall I send you a 8xp file so that you can play with it? |
||
| 11 Feb 2010 05:48:51 pm by EmperorWiggy | Quote | |
| The list T7 should be equal to {1,7}. | ||
| 11 Feb 2010 06:26:21 pm by john massey | Quote | |
| Emperor,
I am totally confused When I check T7 on the home screen I get {1,7} "TA should hold {1,0,0,7}but holds{3,5} |
||
| 11 Feb 2010 06:34:11 pm by EmperorWiggy | Quote | |||
| I don't use a list TA. I use list T7. And I forgot you wanted the zeros in there too (Heh heh... oops). I'll go fix that now.
EDIT: Done. I'll re-upload now.
The link to the .8xp is the same as before. |
||||
| New Post | New Topic |
| Goto page Previous 1, 2, 3 | |
[Switch to Desktop view]
© Copyright 2000-2013 Cemetech & Kerm Martian :: Mobile Design by Alex "comicIDIOT" Glanville
Problems? Issues? Or Suggestions? There's a thread for that!
© Copyright 2000-2013 Cemetech & Kerm Martian :: Mobile Design by Alex "comicIDIOT" Glanville
Problems? Issues? Or Suggestions? There's a thread for that!
