Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
MEMOWIDTH, MLINE() and MEMLINES()
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00030321
Message ID:
00030367
Vues:
50
>>>>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'
>
>not spaces -- zeros. fox will look at that and split on the space.
>
>>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.
The string, with spaces, is 30 characters long. I am interested in the fact that when I set MEMOWIDTH to, say, 32, it prints on the desktop on two lines, but MLINE(memofield,1) prints the whole string, as it should, on one line. It is as if there is some kind of 3 or 4 character margin which applies to the actual printing on the desktop, but not the functions. I haven't tried printing the memo anywhere else this way, and, as I say, I don't really need to.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform