Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
When to Remove Contents of EXPR, TAG and TAG2
Message
From
18/01/2003 09:06:10
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivia
 
General information
Forum:
Visual FoxPro
Category:
Reports & Report designer
Miscellaneous
Thread ID:
00742756
Message ID:
00743129
Views:
26
> ... I'll post the code below (the good thing about posting code is that if you make a mistake, someone will point it out!).

I didn't find a mistake, but there are a few details which I would code different - consider this my personal preferences.
If i#nDeviceline and i#nOutputLine and i#nDriverline
To avoid repeating the variable, "i", I would write this as:
if not inlist(i, nDeviceLine, nOutputLine, nDriverLine)
And in:
m.NewExpr=m.NewExpr + mline(expr,i) +chr(013)
I consider it safer to use the "official" end-of-line delimiter: chr(13) + chr(10).


Finally,
Replace expr with m.NewExpr
Replace tag WITH ""
Replace tag2 WITH ""
I suspect this might execute a little faster with a single replace command:
replace;
  expr with m.NewExpr,;
  tag  with ""
  tag2 with ""
Difference in opinions hath cost many millions of lives: for instance, whether flesh be bread, or bread be flesh; whether whistling be a vice or a virtue; whether it be better to kiss a post, or throw it into the fire... (from Gulliver's Travels)
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform