Basic4ppc


Basic4ppc is a programming language for Pocket PC handheld computers running Windows Mobile operating system, by Anywhere Software. The language is based on a BASIC-like syntax, taking advantage of Microsoft's.NET technology, to allow additional libraries, graphical user interface design of windows forms, rapid application development, and.NET framework compatible compilation. The language implements a unique way of adding objects to a program without being object-oriented. Its advantages are simplicity, development pace and the integration with.NET framework. A special version of the integrated development environment allows developing straight onto the Windows Mobile device. With the demise of Windows Mobile operating system and the devices running it Basic4PPC came to the end of its life in about 2012. For owners of Basic4PPC it remains a useful Windows-desktop BASIC compiler as it runs code directly in the Windows environment and it can compile a project to a Windows 'exe' file for use as a Windows program.

History (major versions)

In 2010 a version for Android phones/tablets was released, this is a separate environment working along the same lines and the language is "basic" like and can be compiled to Android devices.

Language features

Dual development platform: Basic4ppc allows development straight on the handheld device via a fully compatible Device IDE. Code written on either device or desktop IDEs is identical for both platforms and operating systems. Compilation, however, must target either device or desktop, due to the difference in the operating system.
Compilation available in four modes: Windows executable, Device executable for Pocket PC, Desktop executable, and Smartphone executable. Compiled.EXE files require.NET 2.0 framework to be installed on the target machine. This is usually the case with Windows XP SP2 and later, but has to be manually taken care of with earlier versions.
Additional libraries: based on the Microsoft.NET framework, Basic4ppc can use code inside.NET.dll files after being adapted for Basic4ppc. Many such additional libraries exist, most of which are open source, written by users and accessible via the Basic4ppc forum.
Merging: Additional libraries code is merged into the main executable almost always. This way a single file can be deployed.

Characteristics

Basic4ppc is procedural, structural, implementing a partial object-oriented programming model. Syntax is similar to common Basic dialects, most influenced by Visual Basic. It supports events. Like most modern languages, the development environment supplies graphical user interface design tools. Users build applications using the drag and drop, component based UI. This is possible on both Device and Desktop, being unique in this ability.
Regular flow structures, such as if…then and for…next are supported, as in many other Basic versions.
Reserved words: Basic4ppc includes a vast number of reserved words. This is because of variable declaration scope.
Variables can be local, global or public. All variables are typeless. This means you can write the following code:

Sub App_Start
numA = "Five "
numB = "5"
numC = 6
SUM1 = numA & numB 'remark: = "Five 5"
SUM2 = numB + numC 'remark: = 11
End Sub

There is no need to declare variables explicitly.
Subroutines are the most basic unit of code. All code must be written inside subroutines. Subroutines can return a value.
Direct Naming Reference: All internal controls can be accessed directly and passed as parameters to subroutines by specifying their name expressed as a string. This lets the programmer the ability to pass controls as parameters without knowing in advance the control that is to be passed, and without having to deal with either pointers nor with object oriented programming.
AutoScale mode allows developing for different screen resolution having the language taking care of the adjustments needed in UI appearance.

Example code

Here is an example of the language:
Code snippet that displays a message box "Hello, World!" as the application starts, without any forms being loaded:

Sub App_Start
MsgBox
End Sub

Libraries

Based on Microsoft's.NET technology, Basic4ppc supports.NET.DLLs with some minor adjustments. This allowed users to create a lot of open-source libraries, downloadable at the Basic4ppc forum, usually with complete source code. As with many other programming languages, additional libraries include most of the real-world language functionality. Additional libraries cover subjects such as graphics, databases, user interface, GPS, barcode readers and peripheral devices, debug, connectivity, XML, and more.