BASIC

BASIC classico a righe numerate: print/if/goto/gosub/for-next/input. Scrivi basic prog.bas per eseguire un programma da /sdcard/home. Parole chiave minuscole, variabili a una lettera a-z.

versione 1.0.0 · Licenza: BSD-3-Clause · Sito del progetto

BASIC

A cosa serve

Il BASIC classico a righe numerate, come sui computer di una volta: ottimo per imparare le basi della programmazione (variabili, condizioni, cicli, salti).

Come si usa

Scrivi il programma in un file di testo, per esempio conta.bas, nella cartella home:

10 print "quanti numeri?"
20 input n
30 for i = 1 to n
40 print i
50 next i
60 end

Poi nel Terminale:

basic conta.bas

Non c'è una modalità immediata: il programma si scrive in un file e si esegue intero.

Istruzioni

print, input, if ... then, goto, gosub / return, for / next, peek / poke, end.

Regole da ricordare

Nel Terminale

BASIC

Classic line-numbered BASIC: print/if/goto/gosub/for-next/input. Type basic prog.bas to run a program from /sdcard/home. Lowercase keywords, single-letter variables a-z.

version 1.0.0 · License: BSD-3-Clause · Project site

BASIC

What it is

Classic line-numbered BASIC, like on the home computers of old: a good way to learn the basics of programming (variables, conditions, loops, jumps).

How to use it

Write the program in a text file, e.g. count.bas, in the home folder:

10 print "how many numbers?"
20 input n
30 for i = 1 to n
40 print i
50 next i
60 end

Then in the Terminal:

basic count.bas

There is no immediate mode: the program is written in a file and run as a whole.

Statements

print, input, if ... then, goto, gosub / return, for / next, peek / poke, end.

Rules to remember

In the Terminal