Code samples‎ > ‎



Examples of recursion use in nuBASIC
Fact.bas shows how to calculate the factorial of an integer number.

Guess.bas (View code)

This simple game challenges the user to guess a randomly selected number within the 1-10 range, without offering the usual hints of "higher"/"lower".
It is written using QBasic-like dialect syntax supported by nuBASIC.

This code is a simple "Solitaire" Ping Pong demo.

Parabola.bas (View code)

A simple program which shows how to draw a math curve


Readfile.bas (View code)

This simple example shows how to read a text file and display its content on the screen.

Draw image samples

These examples show how to draw bitmap read from file on the screen.
Cartoon shows how to make a simple animation.


Code.bas (View code)

The following program is an example of the ALGOL-like BASIC dialect supported by nuBASIC. 
See also

Math.bas (View code)

This program is an example of Eval function use.

Plane.bas (View code)

This program is another example which shows how to draw bitmaps for creating simple 2D game graphics.