Please enable JavaScript to view this site.

 

Navigation: Macros > Macro Language > Compiler Messages > Errors

Variable is already declared in the macro's main body

Scroll Prev Up Next More

This compiler error is similar to the duplicate variable message, but will occur only if, in a function, you have a variable name which is already declared in either of the global, input, or var sections of the macro's main body.

 

For example:

function MyFunction(nSomeDate): s
var
   nRunDate  // variable already declared in var section below
begin
   return 'OK'
end
 
var
   nRunDate
begin
   // error generated even if the function is never called
end

This error message will be generated even if the function referred to is never used anywhere in the macro.

 

See also: variable is used in one or more function prototypes.

 


Topic 180995, last updated on 18-Apr-2020