How trim?

Ken Ray kray at sonsothunder.com
Sun Oct 23 21:04:08 EDT 2005


On 10/23/05 6:11 PM, "Bob Warren" <robertum at brturbo.com> wrote:

> On 23 Oct 2005, Dave Cragg (<dcragg at lacscentre.co.uk>) wrote:
> 
>> Is there a requirement for the solutions to be one liners?
> 
> --------------
> No, but it would be nice. Originally, I looked in the Help for
> equivalents to the simple Basic functions e.g. LTrim$(MyString$),
> RTrim$(MyString$), and Trim$(MyString$) and was surprised not to be able
> to find them.
> 
> In VB, I use these functions all the time, so I am a bit mystified at
> the apparent lack of desperate need for simple-syntax built-in functions
> on the part of experienced RR programmers. I certainly need this very
> much in the RR stack I am writing at the moment.

Yes, I was surprised as well, since the xTalk languages I'd been using
didn't have them either and the other languages (VB included) did, so I was
hoping that MetaCard (this was before it became Revolution) would have it.

However I must admit I've had to craft a few functions for VB that I was
surprised *it* didn't have one-liners for as well, so I guess it kind of
goes both ways.

> Who knows, we might see statements like the following in future versions
> of RR:
> 
> put the LTrim(32,202,160) of myVar1 into myVar2
> put the Trim(32) of myVar1 into field "Label1"

Actually, if they implemented it, it'd probably be more syntactically
correct as:

  put LTrim(myVar1,space,numToChar(202),numToChar(160)) into myVar2
  put Trim(myVar1,space) into field "Label1"

but either way, it would be very beneficial to have them. Bob, if you've
used Bugzilla or RevZilla before, perhaps you can log those in as requested
enhancements? If you haven't used them, let me know offlist and I'll log the
enhancements for you.


Ken Ray
Sons of Thunder Software
Web site: http://www.sonsothunder.com/
Email: kray at sonsothunder.com




More information about the use-livecode mailing list