Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
TEXT...ENDTEXT problem
Message
 
 
To
08/01/2003 19:32:13
General information
Forum:
Visual FoxPro
Category:
Troubleshooting
Miscellaneous
Thread ID:
00739638
Message ID:
00739666
Views:
5
Bill,

This is a truely annoying problem that I first ran into with the code that creates the articles for my website from the memo fields that hold the article content. This goes back all the way to VFP3.

It's realted to SET MEMOWIDTH and unfortunately you can not set memowidth to a value that will work properly.

My workaround is to use a loop that chunks out the big string 512 bytes at a time. You can use a UDF:
function TextChunk( lcString )

do while ! empty( lcString ) 
   \\<<left( lcString, 512 )>>
   if ( len( lcString ) > 512 )
      lcString = substr( lcString, 513 )
   else
      lcString = ""
   endif
enddo
>
>lc = <SomeString>  && len(lc)=1140
>TEXT NoShow
>  <<lc>>
>ENDTEXT
>
>This is ending up as 2 lines in the file I'm creating. It's breaking it at the last space in lc.
>I'm guessing that it's because len(lc)>1024.
>
>Any ideas on how I can stop it from breaking it into 2 lines?
df (was a 10 time MVP)

df FoxPro website
FoxPro Wiki site online, editable knowledgebase
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform