len of field

Eric Chatonet eric.chatonet at sosmartsoftware.com
Thu Aug 25 11:25:46 EDT 2005


Hi Paul,

repeat until the number of chars of tVar = 14
   put space after tVar
end repeat

or by building a function you can use elsewhere with any number of  
chars:

put Extent(tVar,14) into fld "MyField"

function Extent pString,pNumOfChars
   repeat until the number of chars of pString = pNumOfChars
     put space after pString
   end repeat
   return pString
end Extent

The last method is better: always think you want be able to reuse the  
code you write :-)

Le 25 août 05 à 17:11, Paul Salyers a écrit :

> I need to find out how to add spaces to a field length if the  
> number of characters are less than 14 to equal 14 charters.
>
> I'm using this:
>
> if the number of char  of tVar < 14 then (I need to add spaces to  
> equal 14 char)

Best Regards from Paris,

Eric Chatonet.
----------------------------------------------------------------
So Smart Software

For institutions, companies and associations
Built-to-order applications: management, multimedia, internet, etc.
Windows, Mac OS and Linux... With the French touch

Free plugins and tutorials on my website
----------------------------------------------------------------
Web site        http://www.sosmartsoftware.com/
Email        eric.chatonet at sosmartsoftware.com/
Phone        33 (0)1 43 31 77 62
Mobile        33 (0)6 20 74 50 86
----------------------------------------------------------------




More information about the use-livecode mailing list