Code: 1,0,3,0,5,0,7,0,0,0,0,0,0,0,0,0}→⌊OVER1
ClrHome
0→J
{3,5}→⌊TEMP6
For(J,1,dim(⌊TEMP6
⌊OVER1=⌊TEMP6(J
If not(sum(Ans
0→⌊TEMP6(J
Output(1,1,⌊TEMP6
Pause
ClrHome
End
SortD(⌊TEMP6
sum(⌊TEMP6≠0→dim(⌊TEMP6
SortA(⌊TEMP6
Output(1,1,"JA0
Output(1,4,J
Output(2,1,"OU
Output(2,5,⌊OVER1
Pause
ClrHome
Progress seems to come in small steps. I added 0→J when I checked J on the home screen it was 3. You should note that I checked TEMP6 with this:
Output(1,1,⌊TEMP6. The sort of good news that it showed {1,0,5,7} I was that 3 was removed but I have no idea where the 1 & 7 came from, since {3,5}→⌊TEMP6
The bad news is that the For(J loop made a single pass when I expected it to make two passes.
Edit #1 (post-merge by Kerm):
Code: {1,0,3,0,5,0,7,0,0,0,0,0,0,0,0,0}→⌊OVER1
ClrHome
0→J
{3,5}→⌊TEMP6
For(J,1,dim(⌊TEMP6
⌊OVER1=⌊TEMP6(J
If not(sum(Ans
0→⌊TEMP6(J
Output(1,1,J
Output(1,5,⌊TEMP6
Pause
ClrHome
End
SortD(⌊TEMP6
sum(⌊TEMP6≠0→dim(⌊TEMP6
SortA(⌊TEMP6
Output(1,1,"JA0
Output(1,4,J
Output(2,1,"OU
Output(2,5,⌊OVER1
Pause
ClrHome
I made some changes in this post from the previous post. In The previous post I had
Output(1,1,⌊TEMP6 in this post I have
Output(1,1,J
Output(1,5,⌊TEMP6
Test data follows
In the first pass J=1 it should hold 3 and ⌊TEMP6 holds {3,5} when it should {5}
In the second pass J=2 it should hold 5 and ⌊TEMP6 holds {3,5} when it should hold {}
I would appear that we do not know yet, know how to remove elements from TEMP6
Edit #2 (post merge by Kerm):
Code: {1,0,3,0,5,0,7,0,0,0,0,0,0,0,0,0}→⌊OVER1
ClrHome
{3,5}→⌊TEMP6
SortD(⌊OVER1
sum((⌊OVER1≠0)→dim(⌊OVER1
SortA(⌊OVER1
For(J,1,dim(⌊TEMP6
If J=3:Stop
If ⌊TEMP6(1):⌊OVER1*(⌊OVER1≠J)→⌊OVER1
Output(1,1,"JA
Output(1,4,J
Output(2,1,"OV
Output(2,5,⌊OVER1
Pause
ClrHome
End
I would like to go back to an earlier version of the same problem. It can remove elements from a list. They are just the wrong elements.
In the first pass J=1 so OVER1 holds {0,3,5,7} Assuming we could remove 3 from TEMP6 on the first pass I think we could have a Winner.
The fundamental question is how do we remove a specific element from a list from within a running program?
We do not need a specific solution we need a general solution. We need a solution that allows the user, of the program, to respond in ways that will result in this line element in the If statement ⌊TEMP6 having a large number of variations.