Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
BUG: Deterministic function return not deterministic val
Message
 
 
To
16/10/2003 19:55:08
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00838784
Message ID:
00839612
Views:
34
Jim,

The help topic does mention "integer":

To store values that are both dates and times or only dates, use the DateTime data type. A DateTime value is stored in eight bytes — two four-byte integers.

And the datetime expression topics implicitly state it based on the standard naming conventions:

nSeconds = tTime1 - tTime2

Granted n doesn't necessarily imply integer, but it's certainly not float.

Datetime arithmetic does support fractional seconds though:
lt1 = {^2003-10-16 00:00:00}
? lt1 && :00
lt1 = lt1 + 1.5
? lt1 && :02 - display rounds up
lt1 = lt1 + 1.5
? lt1 && :03

lt1 = {^2003-10-16 00:00:00}
? lt1 && :00
lt1 = lt1 + 1.4
? lt1 && :01 display rounds down
lt1 = lt1 + 1.4
? lt1 && :03 display rounds up
>You seem to know that Datetimes are limited to accepting integers, but no one else would KNOW that from the documentation. I simply cannot find such a restriction in the Help and the tiny bit on "Date and time operators" makes no mention of the fact.
>
>Now why would it be unusual for someone using datetimes to simply use the memvar they already have, that might be real or whatever, in a calculation? Nothing, I should say, UNLESS it is documented as problematic. And if it truly is problematic, wouldn't it be deserving of an error message?
df (was a 10 time MVP)

df FoxPro website
FoxPro Wiki site online, editable knowledgebase
Previous
Reply
Map
View

Click here to load this message in the networking platform