Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Macro recognizing field or memory variable
Message
 
 
To
28/10/2004 20:29:47
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 6
Database:
Visual FoxPro
Miscellaneous
Thread ID:
00955631
Message ID:
00955635
Views:
11
Hi Rich,

It's a bug in VFP that shows up when VFP optimizes string concatenation in form
a = a + b
The optimization kicks in when string lenght exceeds 100 bytes. The workaround is to disable optimization
a = "" + a + b
And, no, you canot bold line iside PRE tag.

>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.
--sb--
Previous
Reply
Map
View

Click here to load this message in the networking platform