Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
MEMOWIDTH, MLINE() and MEMLINES()
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00030321
Message ID:
00030354
Views:
38
>>I have a memo field called comments. I have:
>>SET MEMOWIDTH TO 30
>>REPLACE comments WITH 'a23456789 b23456789 c23456789c'
>>?comments
>>result:
>>a23456789 b23456789
>>c23456789c
>>Since my string is exactly 30 characters long, I might have expected it to print on one line, but it gets worse:
>>?MEMLINES(comments)
>>I get 1, and:
>>?MLINE(comments,1)
>>I get the whole string. Another memo in which I was putting stuff, it kept saying MEMLINES(memofield) = 0 and MLINE(memofield,1) = "" for reasons I also can't determine. Why are these functions not behaving consistently?
>
>try it wo/ the letters and see what you get. alternately, try it with letters only...
I tried\
REPLACE comments WITH '123456789 123456789 1234567890'
and got the same result. I found that if I SET MEMOWIDTH to less than 34, but more than 29, it would print the third group of digits on the second line. However, MLINE(memo,1) would print it all on one line, and MEMLINES(memo) would return 1. If I then used:
REPLACE comments WITH 'abcdefghi klmnopqrs uvwxyzabcd'
I got the same results, except that SET MEMOWIDTH TO 33 was sufficient to make it print on one line.

Since, as I said in the other branch of this thread, the second problem was due to EOF(), this peculiarity will probably not hurt me. I need for MEMLINES() and MLINE() to return correct values, and it looks like they are. I am not actually printing the memo itself (on my desktop). I discovered the first problem while trying to work out the second, which isn't a problem after all.
Thanks.
Previous
Reply
Map
View

Click here to load this message in the networking platform