Re: concatenate fields

2008-07-05 Thread Peter Brigham
On Jul 3, 2008, at 1:00 PM, william humphrey [EMAIL PROTECTED]  
wrote:



Nice -- Where do I get sws tText?


Not sure what you are asking. The function handler should be placed  
sufficiently high in the message path so it is available wherever you  
might need it. Usually this will be in your mainstack stack script,  
or in a library stack script that is in use.


On Wed, Jul 2, 2008 at 7:45 PM, Mark Wieder  
[EMAIL PROTECTED] wrote:



Peter-


If you have this utility function:

function sws tText
  -- strips white space (returns, spaces, tabs, etc)
  -- from tText, fore  aft
  return word 1 to -1 of tText
end sws


That's also handy for stripping the comment off the end of a line  
from a

script...


I don't see how that would work. Trying

put sws(on sws tText  -- strips white space)

gives me

on sws tText  -- strips white space

since the last word of the string is space. AFAICS, this function  
will never strip anything but white space.


Peter M. Brigham
[EMAIL PROTECTED]
___
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution


Re: concatenate fields

2008-07-05 Thread william humphrey
I was thinking that it just wasn't the complete sws function.
___
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution


Re: concatenate fields

2008-07-03 Thread william humphrey
Nice -- Where do I get sws tText?

On Wed, Jul 2, 2008 at 7:45 PM, Mark Wieder [EMAIL PROTECTED] wrote:

 Peter-

  If you have this utility function:
 
  function sws tText
-- strips white space (returns, spaces, tabs, etc)
-- from tText, fore  aft
return word 1 to -1 of tText
  end sws

 That's also handy for stripping the comment off the end of a line from a
 script...

 --
  Mark Wieder
  [EMAIL PROTECTED]



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




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


Re: concatenate fields

2008-07-02 Thread Peter Brigham
On Jul 1, 2008, at 10:00 AM, william humphrey  
[EMAIL PROTECTED] wrote:


Thanks Sarah. I thought I'd have to do it like that with a bunch of  
if's
but I'm always reading these amazing solutions here so I'm  
beginning to
think that there is some magic beyond ordinary mortals. It is a  
relief to

know that sometimes the mundane answer is correct.


If you have this utility function:

function sws tText
  -- strips white space (returns, spaces, tabs, etc)
  -- from tText, fore  aft
  return word 1 to -1 of tText
end sws

which I use all the time -- very handy to put in a library -- then  
you could do:


put sws(fld f1  space  sws(fld f2  space  sws(fld f3)))  
into concatFields


Peter M. Brigham
[EMAIL PROTECTED]
___
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution


Re: concatenate fields

2008-07-02 Thread Mark Wieder
Peter-

 If you have this utility function:

 function sws tText
   -- strips white space (returns, spaces, tabs, etc)
   -- from tText, fore  aft
   return word 1 to -1 of tText
 end sws

That's also handy for stripping the comment off the end of a line from a 
script...

-- 
 Mark Wieder
 [EMAIL PROTECTED] 



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


Re: concatenate fields

2008-07-01 Thread william humphrey
Thanks Sarah. I thought I'd have to do it like that with a bunch of if's
but I'm always reading these amazing solutions here so I'm beginning to
think that there is some magic beyond ordinary mortals. It is a relief to
know that sometimes the mundane answer is correct.
___
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution


concatenate fields

2008-06-30 Thread william humphrey
Good evening and, as always, thanks for the help

What's the best way to concatenate three fields to make one text string with
spaces between the words when you don't know how many or which of the three
fields will contain data and you don't want extra spaces in the result?
___
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution


Re: concatenate fields

2008-06-30 Thread Sarah Reichelt
On Tue, Jul 1, 2008 at 12:44 PM, william humphrey [EMAIL PROTECTED] wrote:
 Good evening and, as always, thanks for the help

 What's the best way to concatenate three fields to make one text string with
 spaces between the words when you don't know how many or which of the three
 fields will contain data and you don't want extra spaces in the result?

put empty into tConcat
if field One is not empty then put field One  space after tConcat
if field Two is not empty then put field Two  space after tConcat
if field Three is not empty then put field Three  space after tConcat
delete last char of tConcat

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