[futurebasic] Re: [FB] Record problem FB7

Message: < previous - next > : Reply : Subscribe : Cleanse
Home   : January 2004 : Group Archive : Group : All Groups

From: Jay Reeve <jayreeve@...>
Date: Sat, 10 Jan 2004 13:03:53 -0600
Ted,

Bernie actually hit it very close. Your routine is doing exactly what 
you're telling it to, but that's not what you want it to do.

What you want to do is not output the values at sequence #'s 
0,1,2,3,4,5,15,16..., but to sort the array!

This is obviously untested, but should be very close to what you're 
looking for:

dim sort%(50)

for ib = 0 to lastqgrade
sort(QCalsteps.Qsequence(i)) = i
next

for ib = 0 to lastqgrade// print grade headers
print #openfile%,ib;_ctab$;
next

print #openfile,"

for ib = 0 to lastqgrade// print grade headers
print #openfile%,Qcalsteps.Qtablegrade(sort(ib));_ctab$;
next

print #openfile,""

  e-e
  =J= a  y
   "


>On Saturday, January 10, 2004, at 01:05  PM, Jay Reeve wrote:
>
>>I haven't followed it through to check, but in the list of numbers 
>>you gave, the tablegrade #12 has a space in front of it. Do you see 
>>any way that could be throwing things off?
>>
>>If that's not it (and I suspect it isn't), what do you get from 
>>this, printing values to screen?
>>
>>for ib = 0 to lastqgrade// print grade headers
>>print #openfile%,QCalsteps.Qsequence(ib);_ctab$;
>>next
>>print #openfile,""
>>dim temp&
>>for ib = 0 to lastqgrade// print grade headers
>>temp = QCalsteps.Qsequence(ib))
>>print ib,temp,Qcalsteps.Qtablegrade(temp)
>>print #openfile%,Qcalsteps.Qtablegrade(QCalsteps.Qsequence(ib));_ctab$;
>>next
>That writes the same improperly mixed up list I last posted - 
>exactly as written to the SS file:
>
>The 'temp' field writes:
>0 1 2 3 4 5 15 16...
>
>with which it associates grades:
>
>-17.92 -15.36 -12.80 -10.24 - 7.68 -5.12 1.28 1.92...
>
>also as it does in the SS.
>
>Note that 1.28 is associated with 15 in the record, as 1.92 is 
>associated with 16.
>
>I know that I've got a serious brain block going on here, and I 
>still can't see through it...
>--
>Ted Spencer
>--
>The man was closest to God who was furthest from his fellow man. 
>(Wayne Johnston)
>
>
>--