adding info to fld

Viktoras Didziulis viktoras at
Sun Nov 12 14:27:44 EST 2006

Whoops, thanks for correction :-) 
-------Original Message------- 
From: Ken Ray 
Date: 11/12/06 20:37:27 
To: Use Revolution List 
Subject: Re: adding info to fld 
On 11/12/06 11:47 AM, "Viktoras Didziulis" <viktoras at> wrote: 
> put fld "tnewscommentshock" & return after fld "shockcomment" 
Actually, it would be the reverse (put the return first): 
put return & fld "tnewscommentshock" after fld "shockcomment" 
However keep in mind that the first time this is executed, if fld 
"shockcomment" is empty, you'll get a leading <return> character that you 
probably don't want. 
Here's one way to do it: 
if fld "shockcomment" is empty then 
put fld "tnewscommentshock" into fld "shockcomment" 
put return & fld "tnewscommentshock" after fld "shockcomment" 
end if 
Another way is to "trim" the data (there was a discussion here that putting 
word 1 to -1 of a string would trim off any leading/trailing white space) 
and do it in one go (watch line wraps): 
put word 1 to -1 of (fld "shockcomment" & return & fld "tnewscommentshock") 
into fld "shockcomment" 
Anyway, that gives you some ideas... 
Ken Ray 
Sons of Thunder Software, Inc. 
Web site: 
Email: kray at 
use-revolution mailing list 
use-revolution at 
Please visit this url to subscribe, unsubscribe and manage your subscription

More information about the Use-livecode mailing list