len of field

Lynch, Jonathan bnz2 at cdc.gov
Thu Aug 25 14:10:21 EDT 2005


Alex suggested:  

  put char len(tVar)+1 to 14 of "              " after tVar

Clever, Alex!

I was looking for a phraseology to do just this thing - thanks.

-----Original Message-----
From: use-revolution-bounces at lists.runrev.com
[mailto:use-revolution-bounces at lists.runrev.com] On Behalf Of Alex
Tweedly
Sent: Thursday, August 25, 2005 1:39 PM
To: How to use Revolution
Subject: Re: len of field

Lynch, Jonathan wrote:

>Here is a single line method:
>
>Put Characters 1 to 14 of (tVar & "              ") into tVar
>
>
>This has a difference, however. It automatically removes all the
characters in tVar past character 14. Perhaps that is preferable?
>  
>
It probably is preferable. If it's not, use

   put char len(tVar)+1 to 14 of "              " after tVar

(make sure you have at least 14 spaces - more doesn't hurt
 you could use "... to -1" - but "... to 14" makes it more 
self-documenting :-)

-- 
Alex Tweedly       http://www.tweedly.net



-- 
No virus found in this outgoing message.
Checked by AVG Anti-Virus.
Version: 7.0.338 / Virus Database: 267.10.15/80 - Release Date:
23/08/2005

_______________________________________________
use-revolution mailing list
use-revolution at lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your
subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution




More information about the use-livecode mailing list