Quote: "Read the file into an array while converting the strings to integers, sort it, then count the consecutive numbers."
After reading this comment I felt like a dork. Makes perfect sense. Thanks!
Edit:
So... I've tried that, and I don't see a problem with my code, but it stops in a crashes with the error: Runtime Error 118 - Array does not exist or array subscript out of bounds at 1129.
Anyone see something?
function drawhistogram()
dim histogram#()
for i = 0 to AmountOfPoints
array insert at bottom histogram#()
histogram#() = val(activeDatafile$(i))
next i
sort array histogram#()
// Clear Current Graph
CLS
// Background Color
ink RGB(1,1,1),0
Box 0,0,screen width(), Screen height()
ink RGB(255,255,255), 0
originalxcord# = ((NextPoint) * ((plotxend-plotxstart)/(AmountOfPoints*2+0.0000000))) + plotxstart
repeat
xcord# = ((NextPoint) * ((plotxend-plotxstart)/(AmountOfPoints*2+0.0000000))) + plotxstart
repeat
height = height + 100
until histogram#(Get Array Index(histogram#)+1) <> histogram#(Get Array Index(histogram#))
box xcord#, 0, xcord# + originalxcord#, height
height = 0
inc NextPoint
until (NextPoint + 1) > AmountOfPoints
get image 1, (plotxstart+1), (plotyend-1), plotxend, plotystart, 1
PlotFlag = 0
undim histogram#()
endfunction
(fixed indentions)
If at first you dont succeed, LOWER YOUR STANDARDS.