7Basic

From Esolang
Jump to navigation Jump to search
This article is not detailed enough and needs to be expanded. Please help us by adding some more information.

7Basic is an ambitious project aimed at creating a cross-platform BASIC compiler that generates native Win32 and i386 ELF executables.

Compiler

The compiler takes 7Basic source files as input and generates an x86 assembly file that must then be assembled and linked. The resultant binary file depends on libc for I/O.

Syntax

The syntax of the language is very loosely based on VisualBasic.

  • variables are declared with their type
  • values can be read from STDIN and printed to STDOUT
  • basic conditional expressions and loops are supported

Example

This simple example will print the classic "Hello, World!" greeting five times:

DIM i AS INTEGER

i = 0
WHILE i < 5
    PRINT "Hello, World!"
    i = i + 1
END WHILE