.. highlightlang:: us .. index:: LibMain .. _libmain: LibMain ======= .. us.tag LibMain ENGLISH Programming.Symboltable A UniScript library (:file:`.ICL`) can have one function with the name :ref:`LibMain`. This function will be called directly after loading the library. .. function:: bool = LibMain() .. us.return **Return Value** If the function succeeds, the return value is TRUE (1); otherwise it is FALSE (0). .. us.comment **Comment** The function can be used to initialize global variables, install user menus, loading DLLs, register DLL functions with the help of :ref:`RegisterFunction` etc. Inside :ref:`LibMain` the function :ref:`loadiclib` should not be invoked. .. seealso:: :ref:`overview-programming`, :ref:`loadiclib`, :ref:`saveiclib`, :ref:`RegisterFunction` :sub:`id-1730351`