Please enable JavaScript to view this site.

 

Navigation: Macros > Macro Language > Compiler Messages > Hints

Function parameter is never used

Scroll Prev Up Next More

This compiler hint will occur if one of the parameters of one of the user-defined functions at the top of your macro is never used in that function.

 

In the example below, the user-defined function ZodiacNameOfDate() was prototyped as allowing the Moon source index to be specified via the nMoonSourceIndex parameter, but within the implementation of that function, the value supplied for the nMoonSourceIndex parameter is never used (instead, the value of 1 is hard-coded).

function ZodiacNameOfDate(nSomeDate nMoonSourceIndex): s
var
   nIndex sBuffer
begin
   nIndex = MoonZodiacSignOf(nSomeDate,0,true,1//<<--- the 1 should be nMoonSourceIndex
   sBuffer = ZodiacName(nIndex)
   return sBuffer
end
 
var
begin
   sResult = ZodiacNameOfDate(n_TokenDate, 1)
end

Note that the macro compiler only tries to compile the code of functions that are used. Therefore, this message will not be issued for an unused function.

 


Topic 188510, last updated on 26-Apr-2025