Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Codeblock
Message
From
26/01/2002 13:55:21
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Codeblock
Miscellaneous
Thread ID:
00611101
Message ID:
00611101
Views:
56
Randy,
Thank you for such a great contribution. The following is part of my procedure which converts a table with memo fields to an Excel file. This procedure works OK if I run it from VFP command window, but it produces a "Function name is missing ) while processing line if mlen < meml(eval(&memofld))" error if I run it through codeblock. Is my procedure violating any of the rules you set for the codeblock?


close data all
use vntr
mmemo=set('memo')
set memo to 95
copy stru to temp
use temp excl in 3
sele temp
store '' to memo1, memo2, memo3, memo4
j=0
for i=1 to fcount()
if type(field(i))='M'
j=j+1
mfield=field(i)
alter table temp alter &mfield C(100)
memofld='memo'+trans(j)
&memofld=field(i)
endif
endfor
sele vntr
go top
scan while !eof()
scat memvar
sele temp
appe blank
gather memvar
sele vntr
mlen=1
i=1
for i=1 to j
memofld='memo'+trans(i)
if mlen < meml(eval(&memofld))
mlen = meml(eval(&memofld))
endif
endfor
sele temp
i=1
for i=1 to mlen
if i>1
appe blank
endif
for k=1 to j
sele vntr
memofld='memo'+trans(k)
ms=strt(mlin(eval(&memofld),i),chr(9),' ')
sele temp
repl (&memofld) with ms
endfor
endfor
endscan
sele temp
copy to (juststem(mdbf)+'.XLS') xl5
set memo to mmemo
Next
Reply
Map
View

Click here to load this message in the networking platform