Please enable JavaScript to view this site.

 

Navigation: Macros > Macro Language > Compiler Messages > Errors

Void functions do not return a value

Scroll Prev Up Next More

Void user-defined functions finish at end and must not contain a return instruction, with or without a value.

 

➢Including a return instruction in a void user-defined function triggers a compilation error.

 

For example.

// user-defined functions
function LogMessage(sSomeMessage)
begin
   // code to log the message
   return bDone // compilation error: return is not allowed in a void function   
end
 
// main body of the macro
var
begin
   // do some processing
   LogMessage('success')
end

Remove the return instruction from a void function. A non-void function must instead return a value matching its declared result type.

 


Topic 110201, last updated on 09-Oct-2026