Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Coding puzzle 2
Message
General information
Forum:
Visual FoxPro
Category:
Other
Title:
Miscellaneous
Thread ID:
00664570
Message ID:
00664651
Views:
21
>>>Ok, that 'puzzle' from Hilmar was far too easy (took me 10 seconds, ok .. 30).
>>>
>>>Here's a nice contest. Who can write the shortest function (using native vfp functions/commands) that returns a person's age. Input is the birthday and the current date. The winner will get 3 points from me!
>>
>>Hmmm... FAQ#7797 ? :)
>
>Looking at that post, I'd say that Gérald Santerre had the shorter function since he simplified
>
>((MONTH(ldMdate)*100 + DAY(ldMdate)) >= (MONTH(ldDob)*100 + DAY(ldDob))
>
>to
>
>RIGHT(DTOS(ldMdate),4) >= RIGHT(DTOS(ldDob),4)
>
>although he used the less than sign and reversed the order of the IIF() clauses to make a shorter expression.
>
>(and that's my to cents worth)
>-Lou.

OY! I should proofread my typing! Those should have been two cents not to sense or perhaps that should have been non-sense as that is what this surely is.
-Lou.
(okay I'll stop typing for a while and sit in the corner now)
"All my life I said I wanted to be someone ...
I can see now that I should have been more specific." -Jane Wagner
Previous
Reply
Map
View

Click here to load this message in the networking platform