Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
What is ASSERT used for?
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00141677
Message ID:
00142608
Views:
39
>But you can't do this always. Everybody complains about the little speed of VFP compared to C++, but this would slow down C++ to that point.

The rule of thumb is that 90% of a program's execution time is spent in 10% of the program. If that 10% is "too slow," then yes, you might not want to validate pointers at that time (though a crashed program is the slowest of all!). This doesn't apply to the other 90%, though.

>>> Assert ASSERT_FOXTOOLS
>>> If not (ASSERT_FOXTOOLS)
>>> Set Library to (FullPath("FoxTools.Fll")) Additive
>>> Assert ASSERT_FOXTOOLS
>>> Endif
>>
>>I like that, except that I don't understand the second ASSERT. It can never fire.
>
>Sure it can, when loading the library was not possible during testing.

Oh, OK. I didn't realize that ASSERT_FOXTOOLS was executable code.

(I wrote more, but the program I'm using detected an error and aborted while I was writing my reply.)
Previous
Reply
Map
View

Click here to load this message in the networking platform