Format

Mark Smith mark at maseurope.net
Sun Jan 28 10:41:07 EST 2007


I don't think format will do this, but it shouldn't be too hard to  
write a function to do it, if you're sure the numbers will be  
consistently 10 digits.

function formatAsPhoneNumber pNumber
   put "(" & char 1 to 3 of pNumber & ")" & space into tFormattedNumber
   put char 4 to 6 of pNumber & "-" & char 7 to 10 of pNumber after  
tFormattedNumber
   return tFormattedNumber
end formatAsPhoneNumber


Best,

Mark

On 28 Jan 2007, at 13:55, LunchnMeets at aol.com wrote:

> Hi Everyone,
>
> Is it possible to use the format command to change:
>
> 2125551212
>
> into
>
> (212) 555-1212
>
> Thanks in advance for your continuing help.
>
> Joe
> Orlando, Florida
> _______________________________________________
> 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