How to test if a field does not contain anything else than returns or tab?
Andre.Bisseret at inria.fr
Wed Feb 4 09:41:35 EST 2009
Thanks to all who paid attention to my question
Quite a nice number of ways (mainly variations around counting the
number of words)
best regards from Grenoble
P.S. Once again I did not receive a couple of messages; those from
Craig ; I saw they were sent thanks to the answers, and on the archives
One more mystery of e-mail ?
Le 3 févr. 09 à 17:09, Hugh Senior a écrit :
> This assumes what you need is whether text is in the field...
> function isEmpty pFld
> return (num of words of fld pFld = 0)
> end isEmpty
> I need to test if a given list field in a stack contains some values
> or if it is empty.
> Well, by "empty" I mean that the field contains not any word or
> number. But it happens that it may include carriage returns and/or
> In such cases :
> field "thisField" is empty
> return false.
> If there were only carriage returns, I could test if each line of the
> field is empty;
> indeed :
> line x of fld "thisField" is empty
> returns true if the only character in the line is cr
> but returns false if there is at least one tab in the line.
> I just tried :
> if last char of fld "thisField" is empty ;-))
> that seems working well ! but a bit strange and might be not
> reliable ?
> Is there a better trick ?
> Thanks for any idea
> Best regards from Grenoble
> use-revolution mailing list
> use-revolution at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
More information about the use-livecode