Siemens Industry Online Support
Siemens AG
Entry type: FAQ Entry ID: 22280011, Entry date: 12/23/2010

What is the meaning of function return values?

  • Entry
  • Associated product(s)

Configuration Notes
Information about this topic is available in the specialist literature on the "C" programming language. More information is available in the WinCC Information System in the path "Working with WinCC > ANSI-C for creating functions and actions".

In addition, it should be mentioned that C functions of the calling function often return a so-called "error code". In the simplest of cases, therefore, a function might return a value of the BOOL data type (TRUE for "Function executed successfully" and "FALSE" for "Function not executed successfully"). Entry ID 22196775 includes a description of how you can use the return value for error handling in C scripts.

Security information
In order to protect technical infrastructures, systems, machines and networks against cyber threats, it is necessary to implement – and continuously maintain – a holistic, state-of-the-art IT security concept. Siemens’ products and solutions constitute one element of such a concept. For more information about cyber security, please visit