[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Convert Integer to Text
- Subject: Re: Convert Integer to Text
- From: m.hadfield(at)niwa.cri.nz ("Mark Hadfield")
- Date: Sun, 13 May 2001 22:13:46 +0000 (UTC)
- Mail-From: m.hadfield@niwa.cri.nz from clam.niwa.cri.nz [202.36.29.1]
- Newsgroups: comp.lang.idl-pvwave
- Organization: Mailgate.ORG Server - http://www.Mailgate.ORG
- References: <00c301c0dbf8$e4e32e40$d938a8c0@Hadfield>
- Xref: news.doit.wisc.edu comp.lang.idl-pvwave:24915
From: ""Mark Hadfield"" <m.hadfield@niwa.cri.nz>
> You can add the prefix and suffix via the "+" operator like this...
>
> name = 'MC'+string(index,format='(I3.3)')+'.dcm'
>
> or within the format specifier like this...
>
> name = string(index,format='("MC",I3.3,".dcm"')'
Of course you can also use printf-style format codes (new to IDL 5.4) like
this
name = string(index,format='(%"MC%3.3d.dcm")')
I suppose there must be somebody out there who actually *uses* this stuff?
---
Mark Hadfield
m.hadfield@niwa.cri.nz http://katipo.niwa.cri.nz/~hadfield
National Institute for Water and Atmospheric Research
--
Posted from clam.niwa.cri.nz [202.36.29.1]
via Mailgate.ORG Server - http://www.Mailgate.ORG