Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Form exits VFP 7 when clicked on
Message
De
16/04/2004 11:15:45
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Divers
Thread ID:
00894140
Message ID:
00895556
Vues:
20

Fabio,

The assert command simply does nothing in the runtime, so there's no need to have the code removed.
...


David, for does nothing, VFP it cannot demand of the time.

BUT THIS IS NOT TRUE, at runtime VFP evaluate ASSERT token, it not eval the expression

ASSERT is fast, but it consumes a little time.

Put next code into a project, run this at design,
compile into a exe, close VFP and run.
MESSAGEBOX("startMode   "+TRANSFORM(_VFP.StartMode))
FOR I=1 TO 10000000
NEXT

t1=SECONDS()
FOR I=1 TO 10000000
NEXT
looptime=SECONDS()-M.T1

t1=SECONDS()
FOR I=1 TO 10000000
*!*	  ASSERT .T. MESSAGE "ASSERT MESSAGE"
*!*	  ASSERT .T. MESSAGE "ASSERT MESSAGE"
*!*	  ASSERT .T. MESSAGE "ASSERT MESSAGE"
NEXT
without=SECONDS()-M.T1-m.looptime

t1=SECONDS()
FOR I=1 TO 10000000
  ASSERT .T. MESSAGE "ASSERT MESSAGE"
  ASSERT .T. MESSAGE "ASSERT MESSAGE"
  ASSERT .T. MESSAGE "ASSERT MESSAGE"
NEXT
withassert=SECONDS()-M.T1-m.looptime

MESSAGEBOX("WITHOUT assert "+TRANSFORM(m.without)+CHR(13);
		+  "WITH    assert "+TRANSFORM(m.withassert))
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform