Fast Track 2.4

From BR Wiki
Revision as of 19:03, 10 September 2014 by Laura (talk | contribs) (→‎Functions)
Jump to navigation Jump to search

Functions

User defined functions can do anything you want them to do. They must start with the letters FN but contain custom code. Variables can be passed in and out of functions. If something calls a function that starts with FN, then you can find the definition of that function by listing for it.

01100  def fnPrintReport(NextFileKey$;___,PN,Index,ThisVersion)
.... function code
01500  end def

In this example, the user defined function is called fnPrintReport, and the above variables are passed into it. NextFileKey$ is required, but variables following the semi-colon are optional and will be set to null if not passed in.

LIBRARIES

To remove some of the repetitiveness of coding. BR allows you to place code in functions in certain programs, which become libraries, to be used from other programs. Fileio is an example of this. It provides functions for opening, reading, writing and rewriting data by calling library functions and passing variables through them. Complete FileIO documentation is available on the wiki and from SageAX. Or you can create your own functions and libraries.

ScreenIO is another library that allows you to create programs much faster and more efficiently. It is so sophisticated that it can be considered an expression engine, similar to VB.NET.

Helpful tutorials for both FileIO and ScreenIO are available at SageAX's website.