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

Home » Public Forums » archive » keyword params in HISTOGRAM
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
keyword params in HISTOGRAM [message #7546] Wed, 20 November 1996 00:00 Go to previous message
Mark Fardal is currently offline  Mark Fardal
Messages: 51
Registered: October 1995
Member
Hi,

I'm sure this is a stupid question, but I can't figure it out.
Normally when you pass keyword parameters, you can pass something
that's undefined, right? As in this example

pro junk1, a, test=test
help,test,t
;junk2, a, test=test ; either one of
junk2, a, test=t ; these works
return
end

pro junk2, a, test=test

a = 3.
return
end

IDL> junk1, a
TEST UNDEFINED = <Undefined>
T UNDEFINED = <Undefined>
IDL>

However, when I try to pass HISTOGRAM a keyword parameter that's
undefined, I get an error message. The routine here is just a
wrapper function for HISTOGRAM, so I want to pass a number of
keyword parameters through to it.

function histomake, array, binsize=binsize, xpoints=xpoints, $
input=input, min=min, max=max, omin=omin, omax=omax, reverse=reverse
[...stuff deleted...]

n = histogram(array, binsize=binsize, min=min, max=max, $
omin=omin, omax=omax, reverse=reverse)

[...stuff deleted...]
return
end

IDL> h = histomake(array, bins=10, xpoints=xpoints)
% HISTOGRAM: Variable is undefined: MAX.
% Execution halted at: HISTOMAKE 52
/users1/casa/fardal/comp/idl/histomake.pro
% $MAIN$


Why is the behavior different here?

Thanks,
Mark
[Message index]
 
Read Message
Read Message
Read Message
Previous Topic: Re: How do people print .ps and .pcl files on windows95
Next Topic: Re: Relative strengths: IDL vs. PV-Wave ?

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

Current Time: Fri Oct 10 12:17:14 PDT 2025

Total time taken to generate the page: 0.24348 seconds