1.2.2 Adding Documentation to an X-Function

Documentation is necessary for an X-Function to be complete. In the documentation, the X-Function creator needs to tell the user something like how to use it, or how it is implemented.

Now documentation, which can be written in four languages: English, Japanese, German, and Chinese, can be packaged into the X-Function. To do this, there are two X-Functions that can be used: xf2doc, and doc2xf. Note that these two X-Functions cannot be found from the menu, and can only be accessed from script. The X-Function xf2doc will unpack the help from the .oxf file and generate a Microsoft Word® document to the specified path (If the option chm is checked, either from the dialog or using script xf2doc chm:=1, a document with the same structure as the chm help will be generated. This is useful when you need to preview the help). Then the document can be edited with Microsoft Word®. After the documentation is finished, you need to save the document and then use doc2xf to package the document into the .oxf file.

When documentation is finished for an X-Function that meets the specifications and can run compatibly, smoothly, and robustly, an integrated X-Function is born. Now you can share the X-Function with others simply through the .oxf file.