

Subroutines and functions should be used to break the code down into smaller ‘bite sized’ chunks.Functions cannot be coupled up to page events, but can be called from subroutines. Functions are normally used to perform an operation, such as converting data and returning in a new format. Ě function also takes parameters, but can return a value.Subroutines are used to link to objects on a page, for example, a button could call a subroutine when it is pressed. Ě subroutine can take parameters but does not return a value.In VB.NET there are two ways of defining methods: IAGs can contain code and expose methods to allow code to be encapsulated within a reusable object (IAG). It is also possible to call a subroutine on a background page. All actions of page objects that call subroutines would result in a call to a function in the page code. Here the user can program functionality specific to that page.

They can be linked to global events such as scheduled events that run at a particular time of day (perhaps export a file to the USB device or something).Įach Page has a code behind. Global subroutines are useful to contain all the common functionality for the whole project. In the NA Series there are several main areas that code can be used: Unlike Visual BASIC from many years ago, VB.NET is a compiled language (not interpreted) which means the quality and speed is comparable to any other. Novice developers will be quickly become familiar with the syntax which is easy to use and forgiving when compared with C#, C++ or Java. VB.NET is now an established language that is widely used. Far from its ‘Beginners’ or Hobby beginnings, VB.NET is now widely used in a commercial setting In the last 10 years Microsoft has developed VB to be used under its. Microsoft Developed Visual BASIC ( VB) to allow users to easily create user interfaces for Windows. Since its development there have been many versions and changes. NET enables the NA to benefit from a huge amount of flexibility and standard functionality that otherwise would take years to develop.īASIC was developed back in 1964! Beginner's All-purpose Symbolic Instruction Code.

The NA is running Windows Embedded Compact 7 (WEC7) and therefore is using the. Code can be used to initialise values when pages are opened/closed. Code may perform calculations to ensure what the user sees is meaningful. Code can also be used to validate values entered and allow the user to correct mistakes. It allows complex logic expressions and mathematical calculations to determine precisely the action to take. Adding code allows more power and flexibility behind an action than simple getting and setting of bits.
