Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
random number
#10
[John_ : i edited your posting in the code part, to make the posting a little bit shorter]

i tried to make your code at least shorter with using
the array example in Pointer , reference , array .

but now i stumble over a problem.
Code:
Copy      Help
lines.remove(cnt)
does not work.

how do i remove and redim my array lines ?

Code:
Copy      Help
int i cnt
str* lines._new(101)
for(i 0 lines._len) lines[i] = _s.from("line" i)
;top
rep 5
,;if lines._len<0;break
,;cnt=Uniform(0 lines._len)        
,out lines[cnt];cnt+1;err goto top
,;lines.remove(cnt);err goto top

lines._delete
pi


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)