comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Adding two strings together
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: Adding two strings together [message #92324 is a reply to message #92322] Tue, 17 November 2015 19:01 Go to previous messageGo to previous message
wlandsman is currently offline  wlandsman
Messages: 743
Registered: June 2000
Senior Member
I suspect you have spaces in front of your variable1. Try setting

variable1 = strtrim(variable1,2)

before your concatenation. --Wayne

On Tuesday, November 17, 2015 at 9:36:30 PM UTC-5, Wayana Dolan wrote:
> So I'm having a devil of a time with something that should be easy.
>
> So I want the end product to look like 'Run07656_Seq0001_Scan012', for every scan in a file I have
> So I put the following in a loop for all of the scans
> x='Run0'+string(variable1)+'_Seq0001_Scan'+string(variable2)
> where variable 1 is the run (ex. 7657), and variable 2 is the scan (ex. 012).
>
> But for some reason they all print out like 'Run0 7656_Seq0001_Scan012'
>
>
> How so I make it so there is no space between the 0 and the 7?
>
> Please help!
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Combining two strings
Next Topic: Transparent overlay in postscript cgimage

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Wed Oct 08 13:36:03 PDT 2025

Total time taken to generate the page: 0.00362 seconds