0 Members and 1 Guest are viewing this topic.
.Removing an element from the list.Let's say the list element is 8 bytes long and held in L1.Let's say the amount of entries in list is held in variable A.Let's say the entry number to be deleted is held in var BCopy(A*8+L1,B*8+L1,8)A--
:.A:ClrDraw:DiagnosticOff:[E050E00000000000→Pic1:.SET LENGTH VAR TO 0:0→C:.MAIN LOOP:Repeat getKey(15):Pause 500:.ADD A BULLET:If getKey(54):0→{C*2+L1}:rand^62→{C*2+L1+1}:C++:End:.LOOP THROUGH/MOVE/DRAW BULLETS AND REMOVE THOSE WHICH PASS OFF SCREEN:If C:For(L,0,C-1:{L*2+L1}+8→{L*2+L1}:Pt-On({L*2+L1},{L*2+L1+1},Pic1:If {L*2+L1}>95:!If L-C-1:conj(C-1*2+L1,L*2+L1,2:End:C--:!If C:Goto A:End:End:End:End:Lbl A:DispGraphClrDraw:.DISPLAY LENGTH FOR DEBUGGING:Text(8,,C►Dec:End
!If L-C-1
If C-1-C-1 = 0
!If L-(C-1)