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

Home » Public Forums » archive » concatenating strings
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
concatenating strings [message #85693] Tue, 27 August 2013 15:56 Go to previous message
Seb is currently offline  Seb
Messages: 15
Registered: January 2006
Junior Member
Hi,

I just began learning IDL, and am not understanding why the following is
not producing the string (20111021):

---<--------------------cut here---------------start------------------->---
IDL> caldat, julday(1, 294, 2011), mon, day, year
% Compiled module: CALDAT.
IDL> print, year, mon, day
2011 10 21
IDL> print, string(year) + string(mon) + string(day)
2011 10 21
---<--------------------cut here---------------end--------------------->---

I thought that the string() function would coerce the numbers to a
string, and then the concatenation operator ('+') would join them
together, but this is not happening. What am I missing?

Cheers,

--
Seb
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: What subprogram? What parameters and keywords?
Next Topic: Emacs IDLWAVE

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

Current Time: Wed Oct 08 15:33:33 PDT 2025

Total time taken to generate the page: 0.00388 seconds