Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Macro recognizing field or memory variable
Message
From
28/10/2004 20:29:47
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Macro recognizing field or memory variable
Environment versions
Visual FoxPro:
VFP 6
Database:
Visual FoxPro
Miscellaneous
Thread ID:
00955631
Message ID:
00955631
Views:
41
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.
Next
Reply
Map
View

Click here to load this message in the networking platform