Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
TEXT...ENDTEXT problem
Message
From
09/01/2003 10:35:34
 
General information
Forum:
Visual FoxPro
Category:
Troubleshooting
Miscellaneous
Thread ID:
00739638
Message ID:
00739799
Views:
7
David,
Thanks. Why didn't I think of that?
I thought it had something to do with MEMOWIDTH, but I couldn't make it work, so I assumed I was wrong.


>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?
Bill Morris
Previous
Reply
Map
View

Click here to load this message in the networking platform