Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
What is ASSERT used for?
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00141677
Message ID:
00142608
Vues:
40
>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.)
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform