General information
Category:
Coding, syntax & commands
>FWIW, I only consider it a misfeature because VFP doesn't do implicit type conversions elsewhere (ala VB). I like implicit type conversions, it keeps your code from being litterd with ALLTRIM(STR()), TRANSFORM(), VAL(), and soforth, but this the fact that this case is so isolated makes it a 'misfeature', IMO.
I'm amazed that given the General type, VFP doesn't typecast it for the expression you're using. I don't know how many times I've set comboboxes to .T. when they were initialized to 0 (un-bound) but .F. (logical bound)
"littered" - i know what you mean. I record time worked in seconds, our accounting software (poor as it is) expects the data in hh:mm format. The simplest calculation is about 2 lines long. hourspart=Str(val(left(allt(cHHMM),2))) Legible code is a utopian fantasy in this environment.
(but then, the legacy code here has 'environment setup' like this:
On Escape QUIT
On Error QUIT
Select Case
Case x = 1
(code)
Case x = 2
(same code as case 1, with different Wait Window message)
Case x = 1 AND y = 2
(doesn't matter what code, it never runs anyway)
End Case
Along with input prompts like "???" and messages "Working..." is it any wonder the users complain?
Previous
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only