Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
A bit tricky math problem
Message
 
 
To
26/04/2010 11:36:09
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Vista
Network:
Windows 2003 Server
Database:
MS SQL Server
Miscellaneous
Thread ID:
01462028
Message ID:
01462045
Views:
54
>If in the range, the 'rangepart' then becomes - zero offset from tnStart
>
>The StartPos-EndPos can span more than one 'rangepart'
>
>rangepartLow =  int( (StartPos - tnStart)/tnIncrement)
>rangepartHigh =  int( (EndPos - tnStart)/tnIncrement)
>
Sorry, something is wrong here. I got 1 and 0 and I used 10000 as starting point and 50000 as increment.

UPDATE. I changed it to

rangepartLow = ceiling( (StartPos - tnStart)/tnIncrement) * m.tnIncrement
rangepartHigh = ceiling( (EndPos - tnStart)/tnIncrement) * m.tnIncrement
If it's not broken, fix it until it is.


My Blog
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform