Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Macro recognizing field or memory variable
Message
De
28/10/2004 20:29:47
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
Macro recognizing field or memory variable
Versions des environnements
Visual FoxPro:
VFP 6
Database:
Visual FoxPro
Divers
Thread ID:
00955631
Message ID:
00955631
Vues:
42
I have an old piece of FPW2.6 code
m.pcEndrFld = "gd" + LOWER(m.tcCovType) + "_end"
SCATTER FIELDS &pcEndrFld MEMO MEMVAR
IF LEN(&pcEndrFld) > 60 THEN
	&pcEndrFld = &pcEndrFld + CHR(13)
ENDIF
&pcEndrFld = &pcEndrFld + PADR(Form_Lookup(m.tcFormNum, m.tdEffdate, m.tcState, "N"), 19)
GATHER MEMVAR FIELDS &pcEndrFld MEMO
I will be rewriting this to use name expressions and get rid of the macro expansions but I'm curious about the following behavior.

pcEndrFld is set as GDGEN_END which is a Memo field in a Fox 2.6 table.

When the bolded line above executes and the length of M.GDGEN_END is 100 or less it will pick up GDGEN_END from the table. When the length of M.GDGEN_END is 101 or greater, it will pick the value from the memory variable.

In FPW2.6, it always seems to get the value from the table.

In both systems SET MEMOWIDTH = 50

Can anybody replicate this behavior and/or provide an explanation as to why this is happening?

Thanks................Rich

PS. Is there a trick I can use to bold face a line inside a < pre > < /pre > block? I keep getting the tags displayed rather than the effects.
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform