Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Why no data type mismatch?
Message
From
04/05/2000 14:51:02
Michael Dougherty
Progressive Business Publications
Malvern, Pennsylvania, United States
 
 
To
04/05/2000 14:33:42
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00366194
Message ID:
00366249
Views:
15
>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
Map
View

Click here to load this message in the networking platform