domingo, 18 de agosto de 2013

Programas/Varios: Balistica

Descripción del programa:
Simula la trayectoria del vuelo de un proyectil.

Datos de ejemplo:
Angulo:45
Gravedad (m/s): 9.8
Velocidad inicial (m/s): 100
Tiempo (seg): 0.1

Programa:

(VERSION:001)

Sub Main
  Rem Balistica
  Inputbox "Auto?";au
  Inputbox "Angulo?";a
  Inputbox "Velocidad inicial?";vi
  If au = "s" Then
    g = 9.8
    tt = 0.1
  Else
    Inputbox "Gravedad?";g
    Inputbox "Tiempo?";tt
  End If
  t = 0
  a = (a * CPI) / 180
  Do
    t = t + tt
    x = vi * Cos(a) * t
    y = (g * ((t ^ 2) / 2)) - (vi * Sin(a) * t)
    Point(x,y + 700,10)
  Loop Until y + 700 > 800 Or x > 1280
End Sub

BIENVENIDOS


Este será el espacio donde encontrarás toda la información acerca de la aplicación AndroBasic para Android: desde el manual de instrucciones hasta programas, dudas, etc...
¡Comparte tus programas con el resto del mundo!


Link de la aplicación AndroBasic para Android:
https://play.google.com/store/apps/details?id=com.AndroBasic.jsptron&hl=es



Programas/Varios:Stars

Descripción del programa:
Se imprimen 800 puntos por la pantalla en posiciones y colores aleatorios:

Programa:
(VERSION:001)


Sub Main
   For a=1 To 800
      x=Rnd(1,1280)
      y=Rnd(1,800)
      c=Rnd(1,10)
      Point(x,y,c)
   Next
End Sub

Programas/juegos: Simon

Descripción del programa: 
Intenta recordar la serie de números aleatorios que van apareciendo en la pantalla hasta llegar a 10!

Programa:
(VERSION:001)

Sub Main
  Rem SIMON
  Randomize
  For a = 1 To 10
    matrix(a,1) = Rnd(1,4)
  Next
  For a = 1 To 10
    For b = 1 To a
      Print " " & matrix(b,1)
      Pause(250)
      Cls
    Next
    Buttons On
    For b = 1 To a
      Do
      Loop Until but > 0
      If matrix(b,1) <> but Then 
        a = a - 1 
        Print "Fallaste! Total numeros recordados " & a
        Stop
      End If
      but = 0
    Next
    Buttons Off
  Next
  Print "Muy bien! Recordaste los 10 numeros"
End Sub

Programas/Juegos: Acertijo

Descripción del programa: 
Mediante preguntas, el programa adivina el número que hayamos pensado (1-999) en muy pocos intentos.

Programa:
(VERSION:001)

Sub Main
  Rem Acertijo
  Msgbox "Piense un numero del 1 al 999" 
  h = 1000
  l = 0
  r = 500
  t = 0
  Do
    t = t + 1 
    Inputbox "El numero que ha pensado es Igual, Menor o Superior que " & r;i
    If i = "s" Then 
      l = r
      r = r + Floor((h-r)/2)
    ElseIf i = "m" Then 
      h = r
      r = r - Floor((r-l)/2)
    End If
  Loop Until i = "i"
  Print "Lo he acertado, total intentos=" & t
End Sub

sábado, 17 de agosto de 2013

Manual de usuario en español


&R0B^SI<






Manual de usuario en español de
AndroBasic for Android
versión 001

Jordi Sorroche Pérez
jsptron@gmail.com
Barcelona Agosto 2013






¿Qué es AndroBasic?
Es un intérprete del lenguaje de programación Basic (Beginners All-purpose Symbolic Instruction Code) especialmente diseñado para tabletas con una resolución en pantalla de 1280 x 800 píxeles y sistema operativo Android.


Funcionamiento y entorno de programación de AndroBasic:
Al ejecutar AndroBasic nos aparecerá la pantalla del editor –con fondo azul y con la subrutina SUB MAIN/END SUB- indicándonos que podemos comenzar a programar.
En la parte superior derecha tenemos unos iconos junto con un menú desplegable con las siguientes opciones:

New:
Se crea un nuevo programa.

Undo:
Deshace el último cambio realizado en el editor.

Redo:
Rehace el último cambio realizado en el editor.

Run:
Pulsaremos sobre esta opción para ejecutar el programa que se halle en ese momento en el editor.

Load Program:
Permite cargar un programa desde la tarjeta SD -interna- instalada en nuestra Tableta a la memoria del dispositivo.
También podemos importar un programa desde el correo electrónico. Para ello, abrimos el e-mail en concreto, guardamos el archivo adjunto (el programa) y lo guardamos en la ubicación (//SD/AndroBasic_Programs), así de simple.

Save Program:
Con esta opción, podremos guardar el programa que hallamos creado en la tarjeta SD-interna- de nuestra Tableta.
También podemos exportar el programa mediante el correo electrónico.
Para ello, nos vamos a la opción de archivos –en le menú de Android- (en la ubicación //SD/AndroBasic_Programs) . Escogemos el que nos interesa, y le damos la opción ‘compartir-enviar correo Elec..’, como archivo adjunto, así de sencillo.

Change Time Process:
Nos brinda la posibilidad de cambiar el tiempo de proceso en la ejecución de un programa -en milisegundos- entre instrucción e instrucción. Por defecto, viene parametrizado con valor de 10, pudiéndose cambiar este valor a un mínimo de 1 y un máximo de 2000 ( 2 segundos). Es importante remarcar que no se debe abusar de tiempos realmente cortos, ya que nuestro dispositivo tiene que procesar otras tareas aparte de las nuestras, y que esto puede conllevar al mal funcionamiento del programa. Sin contar del sobrecalentamiento y a un consumo excesivo de la batería.


Help:
Tutorial del funcionamiento del programa en inglés/español.

About:
Acerca de la creación de AndroBasic.

Exit app:
Sale de la aplicación.

Nuestro primer programa escrito en AndroBasic:
Vamos hacer un sencillo programa al que llamaremos 'Hola Mundo'.
En el editor, dentro de la subrutina Sub Main/End Sub, escribiremos Print "Hola Mundo” el programa quedaría así:

Sub Main
   Print “Hola Mundo”
End Sub

Ahora vamos a ejecutarlo pulsando sobre el icono 'Run'.
Vemos que aparece en pantalla la frase 'Hola Mundo'.


Información detallada de las instrucciones/funciones del lenguaje Basic que soporta AndroBasic ordenadas alfabéticamente:

ABS
Devuelve el valor absoluto.
Ejemplo:
   x=-1
   Print Abs(x)
Resultado:
   1

ACOS
Devuelve el coseno de un ángulo expresado en radianes.
Ejemplo:
   x=0.4
   Print Acos(x)
Resultado:
   1.15928

ACOSD
Devuelve el coseno de un ángulo expresado en grados.
Ejemplo:
   x=0.4
   Print Acosd(x)
Resultado:
   66.42182

ASC
Devuelve un número correspondiente al código de carácter ASCII (American Standar Code for Information Interchange).
Ejemplo:
   x=”@”
   Print Asc(x)
Resultado:
   64

ASIN
Devuelve el seno de un ángulo expresado en radianes.
Ejemplo:
   x=0.4
   Print Asin(x)
Resultado:
   0.41152

ASIND
Devuelve el seno de un ángulo expresado en grados.
Ejemplo:
   x=0.4
   Print Asind(x)
Resultado:
   23.57818

ATAN
Devuelve el ángulo tangente expresado en radianes.
Ejemplo:
   x=0.4
   Print Atan(x)
Resultado:
   0.38051

ATAND
Devuelve el ángulo tangente expresado en grados.
Ejemplo:
   x=0.4
   Print Atand(x)
Resultado:
   21.80141

BEEP
Genera un sonido de corta duración.

BUTTONS OFF
Oculta de la pantalla los cinco botones.

BUTTONS ON
Se muestran en pantalla cinco botones pudiendo controlar que botón ha sido pulsado gracias a la variable interna del sistema but.
Estos son los valores que devuelve la variable but al pulsar uno de los cinco botones:
Botón1=1, botón2=2, botón3=3, botón4=4 y botón5=5.
Para inicializar but, podemos usar el valor 0: but=0.

CALL
Llama a la subrutina con el nombre especificado.
Ejemplo:
   Call nombresubrutina

CHR
Da un carácter correspondiente al valor del código numérico ASCII.
Ejemplo:
   x=64
   Print Chr(x)
Resultado:
   @

CLS
Borra la pantalla.

COLORINK
Define el color del primer plano según el código de color [mirar la tabla de Códigos de color].
Ejemplo:
   x=5
   Colorink(x)
   Print “Hola”
Resultado:
   Hola [se visualiza el texto en color verde]

COLORPAPER
Define el color de fondo según el código de color [mirar la tabla de Códigos de color].
Ejemplo:
   x=4
   Colorpaper(x)
Resultado:
   [se visualiza el fondo de pantalla en color rojo]

COS
Devuelve el coseno expresado en radianes.
Ejemplo:
   x=0.4
   Print Cos(x)
Resultado:
   0.92106

COSD
Devuelve el coseno expresado en grados.
Ejemplo:
   x=0.4
   Print Cosd(x)
Resultado:
   0.99998

DO
Inicia el bucle Do...Loop...

DO UNTIL
Inicia el bucle Do Until...Loop...y continua con el ciclo hasta que se cumpla la condición.

DO WHILE
Inicia el bucle Do While...Loop...y continua con el ciclo mientras se cumpla la condición.

ELSE
Sí la condición precedida de If...Then no se cumple, se procesan las instrucciones justo por debajo de Else hasta End If.

ELSEIF...THEN
Hace la misma función que Else pero añadiendo condición exclusiva.

END IF
Acaba con el condicional If...Then/Else.

END SUB
Finaliza la subrutina Sub...End Sub.

EXIT DO
Sale del bucle Do...Loop...

EXIT FOR
Sale del bucle For...Next.

EXIT SUB
Sale de la subrutina Sub...End Sub.

FLOOR
Devuelve el íntegro.
Ejemplo:
   x=1.4
   Print Floor(x)
Resultado:
   1

FOR...TO...STEP
Inicia un bucle For...Next hasta un número de veces.

IF...THEN
Condiciona dos elementos o más y si se cumple, se procesan las instrucciones justo por debajo de If...Then hasta Else/End If.

INPUTBOX
Recoge los datos introducidos por el usuario y los transfiere a una variable.
Ejemplo:
   Inputbox “Introduzca un nombre”;x
   Print “El nombre introducido es “ & x
Resultado:
   Introduzca un nombre [David]
   El nombre introducido es David

LEN
Devuelve la longitud de una cadena.
Ejemplo:
   x=”Barcelona”
   Print Len(x)
Resultado:
   9

LINE
Dibuja una línea de color [mirar la tabla de Códigos de color] hasta las coordenadas X e Y -final-.
Las coordenadas X e Y iniciales las aporta la instrucción Point o en su caso, la última vez que se haya llamado la instrucción Line.
Si no se llama por primera vez a la instrucción Point el valor origen de las coordenadas X e Y valdrán 0.
Ejemplo:
   Point(0,400,6) [X,Y,Color]
   Line(1280,400,6) [X,Y,Color]
Resultado:
   [Dibuja una línea horizontal en el centro de la pantalla de color azul]

LN
Da el logaritmo en base e.
Ejemplo:
   x=1000
   Print Ln(x)
Resultado:
   6.90775

LOG
Da el logaritmo en base 10.
Ejemplo:
   x=1000
   Print Log(x)
Resultado:
   3

LOGARITHM
Da el logaritmo en cualquier base.
Ejemplo:
   x=1000
   b=10 [base]
   Print Logarithm(x,b)
Resultado:
   3

LOOP
Cierra el bucle Do...Loop y continua con el ciclo.

LOOP UNTIL
Cierra el bucle Do...Loop Until y continua con el ciclo hasta que se cumpla la condición.

LOOP WHILE
Cierra el bucle Do...Loop While y continua con el ciclo mientras se cumpla la condición.

MAX
Devuelve entre dos números el más grande.
Ejemplo:
   Print Max(4,9)
Resultado:
   9

MID
Selecciona caracteres desde una cadena entre la posición inicial hasta la longitud especificada.
Ejemplo:
   x=”Barcelona”
   Print Mid(x,4,3)
Resultado:
   cel

MIN
Devuelve entre dos números el más pequeño.
Ejemplo:
   Print Min(9,4)
Resultado:
   4

MOD
Devuelve el resto después de dividir un número entre un divisor.
Ejemplo:
   Print Mod(3,2) [numero,divisor]
Resultado:
   1

MSGBOX
Muestra en la pantalla superior el texto y espera a que se pulse 'Aceptar'.
Ejemplo:
   Msgbox “Piense un numero”
Resultado:
   Piense un numero

NEXT
Cierra el bucle For...Next y continua con el ciclo.

PAUSE
Detiene la ejecución del programa durante un tiempo expresado en milisegundos.
Ejemplo:
   Pause(1000)
Resultado:
   [Detiene el proceso en 1 seg.]

POINT
Dibuja un punto de color [mirar la tabla de Códigos de color] en las coordenadas X e Y.
Ejemplo:
   Point(640,400,6) [X,Y,Color]
Resultado:
   [Dibuja un punto en el centro de la pantalla de color azul]

POWER
Eleva a la potencia.
Ejemplo:
   x=2
   e=8
   Print Power(x,e)
Resultado:
   256 [el valor 2 se eleva a la potencia de 8]

PRINT
Imprime en pantalla un texto.
Ejemplo:
   Print “Hola Mundo”
Resultado:
   Hola Mundo

RANDOMIZE
Inicializa la semilla de la secuencia pseudoaleatória basado en el reloj interno del sistema.

REM
No hay proceso alguno, simplemente podremos comentar las diferentes líneas de nuestro programa.
Ejemplo:
   Rem Proceso de encriptación

RND
Genera un número pseudoaleatório entre los rangos de min y máx (inclusive).
Ejemplo:
   min=1
   max=10
   Print Rnd(min, max)
Resultado:
   4

ROUND
Redondea un número.
Ejemplo:
   x=1.5
   Print Round(x)
Resultado:
   2

SIN
Devuelve el seno expresado en radianes.
Ejemplo:
   x=0.4
   Print Sin(x)
Resultado:
   0.38942

SIND
Devuelve el seno expresado en grados.
Ejemplo:
   x=0.4
   Print Sind(x)
Resultado:
   0.00698

SQRT
Halla la raíz cuadrada.
Ejemplo:
   x=2
   Print Sqrt(x)
Resultado:
   1.414214

STOP
Detiene la ejecución del programa.

SUB
Nombra a la subrutina Sub...End Sub.
Ejemplo:
   Sub nombresubrutina

TAN
Devuelve la tangente expresado en radianes.
Ejemplo:
   x=0.4
   Print Tan(x)
Resultado:
   0.42279

TAND
Devuelve la tangente expresado en grados.
Ejemplo:
   x=0.4
   Print Tand(x)
Resultado:
   0.00698


Características especiales del lenguaje Basic de AndroBasic:
No son admitidos los dos puntos ':' para separar instrucciones/funciones en la misma línea.
En un condicional, -después de la instrucción Then y en la misma línea- no puede haber nada escrito.
Las variables no son sensibles si se escriben en mayúsculas/minúsculas y son convertidas internamente en mayúsculas.
En los condicionales no son admitidos los paréntesis.
Sólo se admiten 30 parámetros por línea como máximo.
Los programas no pueden contener más de 2.000 líneas.
Las constantes como PI y E se escriben como CPI y CE respectivamente.
Tanto las variables como la matriz son del tipo genéricos, o sea, pueden contener números o cadenas. Ejem: a=5 o a="hola".
Las variables/matriz no se declaran.
No es necesario inicializar las variables/matriz pero sí recomendable -sobre todo en cálculos matemáticos-.
Se pueden utilizar hasta un máximo de 100 variables.
Sólo podemos utilizar una Matriz llamada matrix(a,b) siendo ‘a’ el índice y ‘b’ el subíndice de la tabla. El valor máximo de índices para la matriz es de 10.000 por 10 de subíndices.
Se pueden utilizar hasta un máximo de 100 subrutinas.
En cualquier momento de la ejecución de un programa, podemos abortarlo simplemente pulsando el icono 'Back' -en la parte inferior izquierda de la pantalla-.


Operadores aritméticos:

+   [Adición]
-    [Sustracción]
*   [Multiplicación]
/    [División]
^   [Exponenciación]
%  [Módulo aritmético]


Operadores relacionales:

=    [es igual que]
<>  [no es igual que]
<    [es menor que]
>    [es mayor que]
<=  [es menor o igual que]
>=  [es mayor o igual que]


Operadores de cadena:
& [unión de cadenas]


Operadores lógicos:

And  [dos elementos son verdaderos]
Or    [al menos uno de los elementos es verdadero]
Xor  [sólo un elemento es verdadero]


Códigos de color:

0 = negro
1 = gris oscuro
2 = gris medio
3 = gris claro
4 = rojo
5 = verde
6 = azul
7 = amarillo
8 = magenta
9 = cían
10 = blanco


Listado de errores:

Nº1: 'If' without 'Else/ElseIf/End If'
Nº2: program without 'Sub Main'
Nº3: Too many parameters per line: (max.30)
Nº4: Syntax
Nº5: General process
Nº6: calculation parameters
Nº7: expected 'End Sub'
Nº8: 'For' without 'Next'
Nº9: 'Next' without 'For'
Nº10: 'Exit For' without 'Next'
Nº11: 'Call X' not found
Nº12: 'Exit Sub' without 'End Sub'
Nº13: 'Do Until' without 'Loop'
Nª14: 'Loop' without 'Do Until/Do While'
Nº15: 'Exit Do' without 'Loop'
Nº16: 'Do While' without 'Loop'
Nº17: 'Loop Until' without 'Do'
Nº18: 'Loop While' without 'Do'
Nº19: 'Else' without 'End If'
Nº20: Too many variables (max.100)

miércoles, 14 de agosto de 2013

English user manual


&R0B^SI<






English user manual of
AndroBasic for Android
Version 001

Jordi Sorroche Pérez
jsptron@gmail.com
Barcelona in August 2013




What is AndroBasic?
It is an interpreter for the programming language BASIC (Beginners All-purpose Symbolic Instruction Code) specially designed for tablets with a screen resolution of 1280 x 800 pixels and operating system Android.


Operation and programming environment AndroBasic:
Running AndroBasic screen will appear with a blue background -editor and the subroutine SUB MAIN / END SUB- indicating that we can start programming.
At the top right we have some icons along with a menu with the following options:

New:
It creates a new program.

Undo:
Undo the last change made to the publisher.

Redo:
Redo the last change made to the publisher.

Run:
Will click on this option to run the program that is in that moment editor.

Load Program:
Allows loading a program from the internal SD-card-installed on our tablet to the
device memory.

We can also import files from email. To do this, open the e-mail in particular, keep the attachment (the program) and store it in the location (//SD/AndroBasic Programs) plain and simple.
Save Program:
With this option, you can save the program we found created in the internal SD-Card-
our tablet.
We can also export the program by email. To do this, we go to the file option-in Android-menu will (in the location / / SD / AndroBasic Programs). We choose what interests us, and give you the option 'share send mail Elec .. ', as an attachment, that simple.

Time Change Process:
It gives us the ability to change the processing time in the execution of a program-in
milliseconds between instruction and instruction. The default value is parameterized
10, being able to change this value to a minimum of 1 and a maximum of 2000 (2 seconds). This is important to note that you should not abuse really short time since our device has to process other tasks apart from our own, and that this may lead to
program malfunction. Not counting from overheating and excessive consumption
battery.

Help:
Tutorial program performance in English / Spanish.


About:
About creating AndroBasic.

Exit app:
Exits the application.


Our first program written in AndroBasic:
We make a simple program that will be called 'Hello World'.
In the editor, inside the subroutine Sub Main / End Sub, write Print "Hello World"
the program would look like:

Sub Main
Print "Hello World"
End Sub

Now let's run it by clicking on the icon 'Run'.
We see that displayed the phrase 'Hello World'.


Detailed instructions/functions of the Basic language that supports AndroBasic alphabetical order:

ABS
Returns the absolute value.
Example:
x = -1
Print Abs (x)
Result:
1

ACOS
Returns the cosine of an angle expressed in radians.
Example:
x = 0.4
Print Acos (x)
Result:
1.15928

ACOSD
Returns the cosine of an angle in degrees.
Example:
x = 0.4
Print Acosd (x)
Result:
66.42182

ASC
Returns a number corresponding to the ASCII character code (American Standard Code for Information Interchange).
Example:
x = "@"
Print Asc (x)
Result:
64

ASIN
Returns the sine of an angle in radians.
Example:
x = 0.4
Print Asin (x)
Result:
0.41152

ASIND
Returns the sine of an angle in degrees.
Example:
x = 0.4
Print Asind (x)
Result:
23.57818

ATAN
Returns the tangent angle in radians.
Example:
x = 0.4
Print Atan (x)
Result:
0.38051

ATAND
Returns the tangent angle in degrees.
Example:
x = 0.4
Print Atand (x)
Result:
21.80141

BEEP
Generates a short duration sound.

BUTTONS OFF
Screen Hides the five buttons.

BUTTONS ON
Are displayed five buttons that can control button has been pressed by internal system variable but.
These are the values returned by the variable but when one of the five buttons:
button1 = 1, button2 = 2, Button3 = 3, button4 = 4 and Button5 = 5.
To initialize but we can use the value 0: but = 0.

CALL
Calls the subroutine with the specified name.
Example:
Call namesubroutine

CHR
Give a character corresponding to the ASCII numeric code value.
Example:
x = 64
Print Chr (x)
Result:
@

CLS
Clears the screen.

COLORINK
Sets the foreground color according to the color code [code table look color].
Example:
x = 5
Colorink (x)
Print "Hello"
Result:
Hello [is displayed in green text]

COLORPAPER
Defines the background color according to the color code [code table look color].
Example:
x = 4
Colorpaper (x)
Result:
[Background is displayed red screen]

COS
Returns cosine in radians.
Example:
x = 0.4
Print Cos (x)
Result:
0.92106

COSD
Returns cosine in degrees.
Example:
x = 0.4
Print COSD (x)
Result:
0.99998

DO
Start the loop Do ... Loop ...

DO UNTIL
Start the loop Do Until ... Loop… and the cycle continues until the condition is met.

DO WHILE
Start the loop Do While ... Loop ...and the cycle continues while the condition is met.

ELSE
Yes preceded condition If ... Then is not met, the instructions are processed just
under to End If Else.

ELSEIF ... THEN
Does the same function but adding Else exclusive status.

END IF
Ends the conditional If...Then / Else.

END SUB
Ends the subroutine Sub ... End Sub.

EXIT DO
Exits the loop Do ... Loop ...

EXIT FOR
Exits the For ... Next loop.

EXIT SUB
Exits the subroutine Sub ... End Sub.

FLOOR
Returns the full.
Example:
x = 1.4
Print Floor (x)
Result:
1

FOR ... TO ... STEP
Start a For ... Next loop to a number of times.

IF ... THEN
Determines two or more elements and if satisfied, the instructions are processed just below of If ... Then to Else / End If.

INPUTBOX
Collect the data entered by the user and transfers them to a variable.
Example:
Inputbox "Enter a name"; x
Print "The name entered is" & x
Result:
Enter a name [David]
The entered name is David

LEN
Returns the length of a string.
Example:
x = "Barcelona"
Print Len (x)
Result:
9

LINE
Draw a colored line [look Codes table color]to the coordinates X and Y -End.
The initial x and y coordinates the instruction provides Point or possibly, the last time instruction is called Line.
If not called for the first time to the instruction value Point origin of coordinates X and Y be worth 0.
Example:
Point (0,400,6) [X, Y, Colour]
Line (1280,400,6) [X, Y, Colour]
Result:
[Draws a horizontal line in the center of the screen in blue]

LN
Give the logarithm base e.
Example:
x = 1000
Print Ln (x)
Result:
6.90775

LOG
Take the logarithm base 10.
Example:
x = 1000
Print Log (x)
Result:
3

LOGARITHM
Give the logarithm in any base.
Example:
x = 1000
b = 10 [base]
Print Logarithm (x, b)
Result:
3

LOOP
Closes the Loop Do ... Loop and the cycle continues.

LOOP UNTIL
Shut Do ... Loop Until loop and the cycle continues until the condition is met.

WHILE LOOP
Shut Do ... Loop While loop and the cycle continues while the condition is met.

MAX
Returns two numbers the largest.
Example:
Print Max (4.9)
Result:
9

MID
Select characters from a string starting position to a specified length.
Example:
x = "Barcelona"
Print Mid (x, 4,3)
Result:
cel

MIN
Returns between two numbers is the smallest.
Example:
Print Min (9.4)
Result:
4

MOD
Returns the remainder after a number is divided by a divisor.
Example:
Print Mod (3.2) [number, divisor]
Result:
1

MSGBOX
Shows in the upper display text and wait for it to click 'OK'.
Example:
Msgbox "Think of a number"
Result:
Think for a number

NEXT
Closes For ... Next loop and continues the cycle.

PAUSE
Stops program execution for a time in milliseconds.
Example:
Pause (1000)
Result:
[Stop the process in 1 sec.]

POINT
Draw a colored point [see the table of codes color] in the X and Y.
Example:
Point (640,400,6) [X, Y, Colour]
Result:
[Draws a point at the center of the screen in blue]

POWER
Raised to the power.
Example:
x = 2
e = 8
Print Power (x, e)
Result:
256 [the value 2 is raised to the power of 8]

PRINT
Prints on a text screen.
Example:
Print "Hello World"
Result:
Hello World

RANDOMIZE
Initializes the seed of the pseudo random sequence based on the internal system clock.

REM
There is no process simply can comment on the different lines of our program.
Example:
Rem encryption process

RND
Generates a pseudo-random number between min and max range (inclusive).
Example:
min = 1
max = 10
Print Rnd (min, max)
Result:
4

ROUND
Rounds a number.
Example:
x = 1.5
Print Round (x)
Result:
2

SIN
Returns the sine in radians.
Example:
x = 0.4
Print Sin (x)
Result:
0.38942

SIND
Returns the sine in degrees.
Example:
x = 0.4
Print Sind (x)
Result:
0.00698

SQRT
The square root.
Example:
x = 2
Print Sqrt (x)
Result:
1.414214

STOP
Stops the execution of the program.

SUB
Name the subroutine Sub ... End Sub.
Example:
Sub namesubroutine

TAN
Returns the tangent in radians.
Example:
x = 0.4
Print Tan (x)
Result:
0.42279

TAND
Returns the tangent in degrees.
Example:
x = 0.4
Print Tand (x)
Result:
0.00698


Special features AndroBasic Basic language:
They are not admitted the colon ':' to separate instructions / functions on the same line.
In a conditional-Then statement after and on the same line, there can be nothing writing.
The variables are not sensitive if they are written in upper / lower case and are converted uppercase internally.
Conditionals in parentheses are not admitted.
Pets are only 30 parameters per line maximum.
Programs can not contain more than 2,000 lines.
The constants PI and E are written as CPI and CE respectively.
Both variables and the matrix are of generic, ie can contain numbers or chains. EG: a = 5 or a = "hello".
Variables / array is not declared.
It is not necessary to initialize variables / array but is recommended, especially in calculations math.
You can use up to 100 variables.
We can only use an array called matrix (a, b) where 'a' index and 'b' the subscript
Table. The maximum value for the array index is 10,000 by subscripts 10.
Can be used up to 100 subroutines.
At any time during the execution of a program, we simply abort clicking the icon 'Back' at the bottom-left of the screen.


Arithmetic operators:

+   [Addition]
-    [Abduction]
*   [Multiplication]
/    [Division]
^   [Exponentiation]
%  [Module arithmetic]


Relational operators:

=   [Equals]
<> [Not equal to]
<   [Is less than]
>   [Is greater than]
<= [Is less than or equal to]
>= [Is greater than or equal to]


String operators:

& [Connection string]


Logical operators:

And [two items are true]
Or [At least one of the elements is true]
Xor [Only one element is true]


Color codes:

0 = black
1 = dark gray
2 = medium gray
3 = light gray
4 = red
5 = green
6 = Blue
7 = Yellow
8 = magenta
9 = cyan
10 = white


List of errors:

Nº1: 'If' without 'Else / ElseIf / End If'
Nº2: Program without 'Sub Main'
Nº3: Too many parameters per line: (max.30)
Nº4: Syntax
Nº5: General process
Nº6: Calculation parameters
Nº7: Expected 'End Sub'
Nº8: 'For' without 'Next'
Nº9: 'Next' without 'For'
Nº10: 'Exit For' without 'Next'
Nº11: 'Call X' not found
Nº12: 'Exit Sub' without 'End Sub'
Nº13: 'Do Until' without 'Loop'
Nº14: 'Loop' without 'Do Until / Do While'
Nº15: 'Exit Do' without 'Loop'
Nº16: 'Do While' without 'Loop'
Nº17: 'Loop Until' without 'Do'
Nº18: 'Loop While' without 'Do'
Nº19: 'Else' without 'End If'
Nº20: Too many variables (max.100)