Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Crap code
Message
De
18/04/2021 16:18:27
John Ryan
Captain-Cooker Appreciation Society
Taumata Whakatangi ..., Nouvelle Zélande
 
 
À
18/04/2021 16:12:57
Lutz Scheffler
Lutz Scheffler Software Ingenieurbüro
Dresden, Allemagne
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
Divers
Thread ID:
01679827
Message ID:
01679885
Vues:
68
>
wMessBody = wMessBody + CHR(13) + ALLTRIM(STR(ScanGrL.OrdNmb))
>

>>Do not forget comparing with literal containing chr(13) -- 0h0D. Finally there is no need to call a function or store something to a variable what is a clear literal.

I need to check how the VFP pcode / IL stores chr(13) - if it's passing "13" to the interpreter then there's a bit of overhead there.

This is fairly esoteric stuff though, since one of the VFP C++ Compiler obfuscation techniques involves making simple equations far more complex and introducing math. E.g. chr(13) might become chr(1003+47-1037) so a hacker can't just search for chr(13). The string "Hello" can be converted to a series of similar chr() concatenations for the same reason- yet impact on performance is negligible unless there's a huge looping construct.
"... They ne'er cared for us
yet: suffer us to famish, and their store-houses
crammed with grain; make edicts for usury, to
support usurers; repeal daily any wholesome act
established against the rich, and provide more
piercing statutes daily, to chain up and restrain
the poor. If the wars eat us not up, they will; and
there's all the love they bear us.
"
-- Shakespeare: Coriolanus, Act 1, scene 1
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform