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

Home » Public Forums » archive » Re: Problems to use variables in a keyword-expression
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: Problems to use variables in a keyword-expression [message #14320 is a reply to message #14314] Tue, 09 February 1999 00:00 Go to previous message
J.D. Smith is currently offline  J.D. Smith
Messages: 214
Registered: August 1996
Senior Member
Ospite1 wrote:
>
> Hello,
>
> at the moment I have problems to find the right syntax for using
> variables in a
> keyword expression.
>
> My problem looks like this:
>
> the user should give an identifation number (num) for example
> 141098222.2 . With
> the FINDFILE command, which has integrated the count-keyword, I want to
> find the amount of all files in my directory ' paz' which begin with
> this number , they are named 141098222.21 , 141098222.22 etc.
>
> The expression has to be something like this :
>
> anzfile = FINDFILE [ string(num*),format='(i12)' , count=anz ]
>
> Unfortunalely this is command doesn't work.
>
> Please help me !
>
> Ruth

Try

anzfile=findfile(string(format='(I0,"*")',num),count=anz)

but only if num is an integer. If you really want num to be decimal,
your user must pass it in as a string, unless you just happen to know
you *always* want only one digit past the decimal, in which case you can
use a floating format. This is more error prone and dangerous, however.

Good Luck,

JD


--
J.D. Smith |*| WORK: (607) 255-5842
Cornell University Dept. of Astronomy |*| (607) 255-6263
304 Space Sciences Bldg. |*| FAX: (607) 255-5875
Ithaca, NY 14853 |*|
[Message index]
 
Read Message
Read Message
Previous Topic: Problems using the alpha-channel in the IMAGE object
Next Topic: SFADE_SURF + COLOR

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

Current Time: Wed Dec 03 20:32:11 PST 2025

Total time taken to generate the page: 3.20279 seconds