1. The problem statement, all variables and given/known data I've created a function inside IDL and I want to be able to specify the binsize. That is, I want to have: result = myfunction(array, keyword) Whenever I add the keyword in the brackets there it says: "Keyword parameters not allowed in call." 2. Relevant code FUNCTION histimage, array, binsize=x If KEYWORD_SET(x) then $ count = uintarr(256/x) array = array*(1/x) array=round(array) *end if else begin count = uintarr(256) for j = 0,255 do begin for k = 0,255 do begin count(array(j,K)) = count(array(j,k)) + 1 endfor endfor Return, count END Histimage is the name of my function and binsize is the keyword. The point in the code where there is a * shows where I get a compile error as well. I can't see why I get this error and was hoping that someone could tell me if I've used incorrect syntax.