# Nano Basic - Basic language interpreter

Download on AppStore. Free Turn your mobile device into a real computer

What makes a computer a computer? Actually, it follows from its name, derived from the word compute - compute. Yes, he has to calculate. But not as a calculator or even a programmable calculator. Computer must give us the opportunity to program complex calculation algorithms, enter the source data and get results not only in the form of numbers, but also texts, charts and graphs.

To solve this problem in the very first computers were built interpreter programming language Basic. It has a million flaws, but there is one distinct advantage - it is easy to understand and use. And so should be the first programming language for beginners, so that they no longer considered something terrible programming and complex. It's almost like a WYSIWYG editor. What you see is what you get. One can write on paper a = 2, b = 5, y = a + b, and on Basic it looks exactly

a = 2

b = 5

y = a + b

And, you can print the result and PRINT y. And no variable declarations , begin, end , etc.

Nano Basic for iPhone and iPad has been designed to connect people to the programming. By definition, it should be free and so is.

The program interface is as simple as the program itself and consists of four tabs:

1. Program editor. Here you can enter the program with a standard keyboard. Code templates are available. The program can be saved in a file (it gets into your library files on the third tab) or send by email.
2. Console. After pressing the "Run" in the editor the program will be executed and you will automatically switch to the tab "Console". The program results are printed here. If the program requires data from the user, it will ask for them in the dialog box. The result can also be sent by email.
3. Files. Here you will find some useful examples that can help you to understand the basics of the language. Your programs will be stored here too.
4. Help. Description of Nano Basic features and built-in functions.

This version has the following elements of the Basic language:

• Operator IF – THEN - ELSE
• Operator FOR - TO - STEP - NEXT
• Operators GOTO, GOSUB, RETURN, END
• Variables int, float, char.
• Mathematical Functions abs, atn, cos, rnd, exp, int, log, log10, sin, sqr, tan
• Text output functions PRINT or simply "?".
• Console input function INPUT.
• Operators +, -, *, /, %, <, >, <=, >=, ==, <>, AND, OR, NOT, MOD
• Line Numbering.

Example

REM
REM Example of if, goto, gosub
REM
a = 1
b = 2
c = 3
IF c > 2 AND b < 3 THEN PRINT "c > 2"
? A + 100 - (B * C) / 2
GOSUB 100
? B ^ 5
END
REM
REM -- SUBROUTINE --
REM
100 PRINT "String 1"; "String 2", A + 100 - (B * C) / 2
GOSUB 200
return
200 PRINT "String 3\n"
return