New topic: 

Adding 2 Strings of Text

<http://forums.realsoftware.com/viewtopic.php?t=38052>

         Page 1 of 1
   [ 4 posts ]                 Previous topic | Next topic          Author  
Message        S.Rampling          Post subject: Adding 2 Strings of 
TextPosted: Thu Mar 10, 2011 8:30 pm                         
Joined: Sat Jan 08, 2011 4:47 pm
Posts: 155
Location: Sydney, Australia                How do I add 2 Strings of Text, for 
example.Code:txt1.text = "Shane"
txt2.text = "Gail"
The Outcome I would like is txt3.text = "ShaneGail"
Where both strings are joined.

Thanks Shane.      
_________________
Thanks to any and all who can help with my limited knowledge of Real Studio.
54YO Kart Racer from Sydney Australia
Real Studio 2010r5.1 Win 7  
                             Top                 timhare          Post subject: 
Re: Adding 2 Strings of TextPosted: Thu Mar 10, 2011 8:35 pm                    
     
Joined: Fri Jan 06, 2006 3:21 pm
Posts: 9429
Location: Portland, OR  USA                dim outcome as string
outcome = txt1.text + txt2.text

"+" is the concatenation operator when used with strings.   
                             Top                S.Rampling          Post 
subject: Re: Adding 2 Strings of TextPosted: Thu Mar 10, 2011 10:05 pm          
               
Joined: Sat Jan 08, 2011 4:47 pm
Posts: 155
Location: Sydney, Australia                Thanks Tim, should the following 
work then,Code:  dim rs as recordset = karter.SQLSelect("select * from data 
where PK = "+ str(datapk))
  txttest.text = rs.Field("pcname").stringValue + 
rs.Field("username").stringValue + rs.Field("email").stringValue
  rs.Close
datapk has been decalred as an Integer in properties.
Should this add pcname+username+email as one string      
_________________
Thanks to any and all who can help with my limited knowledge of Real Studio.
54YO Kart Racer from Sydney Australia
Real Studio 2010r5.1 Win 7  
                             Top                 timhare          Post subject: 
Re: Adding 2 Strings of TextPosted: Thu Mar 10, 2011 10:32 pm                   
      
Joined: Fri Jan 06, 2006 3:21 pm
Posts: 9429
Location: Portland, OR  USA                Yes, that should work.   
                             Top             Display posts from previous: All 
posts1 day7 days2 weeks1 month3 months6 months1 year Sort by AuthorPost 
timeSubject AscendingDescending          Page 1 of 1
   [ 4 posts ]      
-- 
Over 1500 classes with 29000 functions in one REALbasic plug-in collection. 
The Monkeybread Software Realbasic Plugin v9.3. 
http://www.monkeybreadsoftware.de/realbasic/plugins.shtml

[email protected]

Reply via email to