ThinBasic

ThinBasic

Infobox programming language
name = ThinBasic

developer = Eros Olmi and Roberto Bianchi
latest_release_version = v1.6.0.10
latest_release_date = July 5 - 2008
dialects = BASIC
operating_system = Windows
license = Freeware
website = http://www.thinbasic.com/

thinBasic is a BASIC-like computer programming language interpreter, specifically written for computer automation. As the project continues, it can be used for a wide range of tasks.

Features

* Rich set of about 1300 predefined keywords, provided by modules
* User-defined functions with local, static or global variable declaration can take up to 32 parameters
* Wide range of data types:
** Dynamic ( STRING up to 2Gb automatically managed) and fixed length ( STRING * n, ASCIIZ * n) strings
** Integer datatypes: BOOLEAN, BYTE, WORD, INTEGER, DWORD, LONG, QUAD
** Floating point datatypes: SINGLE, DOUBLE, EXT, CURRENCY
** Other: VARIANT, GUID
** Pointers

* User defined types: TYPEs, UNIONs
* All main flow control statements:
** SELECT CASE
** IF ... THEN/ELSEIF/ELSE/END IF
** loops ( infinite, conditional, FOR, WHILE, DO/LOOP WHILE ..., DO/LOOP UNTIL ...)

* Dynamic calling of functions (using function name composed at runtime using string expression) gives great power

* Modules for extending keywords and functionality
** User interface
** Console
** File handling
** Formula evaluation
** 3D graphics
** Game devices input
** Script self-compilation
** Internet communications
** Statistics
** Tokenizer
** Printing
** Machine code and assembler
** ...
* OpenGL, XML, ODE handling via header files
* Comes with IDE: thinAir
** Syntax highlighting
** Optional organization of code to projects
** Code templates
** Optional script obfuscation
** Creation of independent executable from script

* Module development using SDK for many languages ( PowerBASIC, FreeBASIC, IBASIC, C, MASM, ... )

References

* Web site: http://www.thinbasic.com/
* Community forum: http://community.thinbasic.com/
* Online help: http://www.thinbasic.com/public/products/thinBasic/help/html/index.html
* Download page: http://www.thinbasic.com/index.php?option=com_docman&Itemid=66

Code samples

Console program, which asks user about name and then greets him:' Specifies program will use functions from console moduleUSES "Console"

' Creates global variable to hold user nameGLOBAL UserName AS STRING

' Asks user for the nameConsole_Print("What is your name?: ")

' Stores it to variableUserName = Console_ReadLine

' If length of username is 0 then no name is specified, else program will say helloIF Len(UserName) = 0 THEN Console_PrintLine("No user name specified...") ELSE Console_PrintLine("Hello " + UserName + "!") END IF

' Waits for any key from user before program endsConsole_WaitKey

Comparison of traditional and special technique to call functions:' Use File module for handling filesUSES "FILE"

' Assign file name to variable, notice assignment can be done at time of declaring variableGLOBAL MyFile AS STRING = "c:File.txt"GLOBAL ReturnValue AS LONG

' Determine file extension, convert to upper case' and according to the type call appropriate functionSELECT CASE UCASE$(FILE_PATHSPLIT(MyFile, %Path_Ext)) CASE "TXT" ReturnValue = Load_Txt(MyFile) CASE "BMP" ReturnValue = Load_BMP(MyFile)

END SELECT

FUNCTION Load_TXT( fName as string ) AS LONG

' Code to load TXT file here

END FUNCTION

FUNCTION Load_BMP( fName as string ) AS LONG

' Code to load BMP file here

END FUNCTION' Use File module for handling filesUSES "FILE"

' Assign file name to variable, notice assignment can be done at time of declaring variableGLOBAL MyFile AS STRING = "c:File.txt"GLOBAL ReturnValue AS LONG

' Functions are named Load_, so we can determine' the function name we need at run time and save some lines of codeCALL "Load_"+FILE_PATHSPLIT(MyFile, %Path_Ext) ( MyFile ) To ReturnValue

FUNCTION Load_TXT( fName as string ) AS LONG

' Code to load TXT file here

END FUNCTION

FUNCTION Load_BMP( fName as string ) AS LONG

' Code to load BMP file here

END FUNCTION

Pros and cons

Advantages:
* Takes full advantage of resources provided by Windows platform ( registry, user interface, work with processes, COM, DLLs)
* Usually fast execution
* Speed optimizations can be done using machine code and assembler
* Under continuous development

Disadvantages:
* Only for Windows platform
* Performance of applications can be lower comparing to output of compilers, thanks to language interpreter nature
* Object-oriented programming classes are not implemented

Compatibility

thinBASIC has been developed under Microsoft Windows XP Professional using PowerBASIC, and requires Internet Explorer version 5.50 or above.

* Extensively tested: Windows 2000 and Server, XP, Vista, Server 2003
* Partly supported: Windows 98 SE, Me
* Unsupported: Windows 95

See also

* Basic4GL
* Baltie
* Blitz Basic
* Brutus2D
* Darkbasic
* FreeBASIC
* Game Maker
* Interactive fiction development systems
* List of BASIC dialects
* List of BASIC dialects by platform

External links

* [http://www.thinbasic.com/ Official website]
* [http://psch.thinbasic.com/ Graphics tutorials]
* [http://tab.thinbasic.com/ thinBASIC Adventure Builder]
* [http://www.shnetworks4.net/~asciiwor/pcopy/issue50/ PCOPY! Issue #40] , November 16th 2007, About ThinBasic, Eros Olmi.
* [http://www.shnetworks4.net/~asciiwor/pcopy/issue50/ PCOPY! Issue #50] , March 15th 2007, 3D graphics in ThinBASIC, Petr Schreiber.
* [http://community.thinbasic.com/index.php?action=dlattach;topic=1865.0;attach=2694 ThinBasic Journal #1] , July 5th 2008, PDF


Wikimedia Foundation. 2010.

Игры ⚽ Нужно сделать НИР?

Look at other dictionaries:

  • AutoIt — Développeur Jonathan Bennett et le groupe AutoIt Dernière version 3 …   Wikipédia en Français

  • Хронология языков программирования — Списки языков программирования По категориям Хронологический Генеалогический Хронология языков программирования  упорядоченный в хронологическом порядке список языков программирования. Содержание …   Википедия

  • Преобразование Шиндлера — Преобразование Шиндлера(Schindler Transformation) эффективный алгоритм упорядочивания элементов с большой длиной ключа, использованием обычной поразрядной сортировки. Спустя год после опубликования алгоритма BWT, Михаэлем Шиндлером было… …   Википедия

  • BASIC — This article is about the programming language. For the think tank, see British American Security Information Council. For the group of countries, see BASIC countries. For other uses, see Basic (disambiguation). BASIC Screenshot of Atari BASIC,… …   Wikipedia

  • GW-BASIC — Appeared in 1983 Developer Microsoft (for Compaq) Stable release 3.23 (1988) …   Wikipedia

  • Interpreted language — In computer programming an interpreted language is a programming language whose implementation often takes the form of an interpreter. Theoretically, any language may be compiled or interpreted, so this designation is applied purely because of… …   Wikipedia

  • OpenGL — Original author(s) Silicon Graphics Developer(s) Khronos Group Stable release 4.2 …   Wikipedia

  • QuickBASIC — Not to be confused with QBASIC. QuickBASIC The opening screen of QuickBasic Developer(s) Microsoft Corporation Initial release 1985 …   Wikipedia

  • XBasic — is a variant of the BASIC programming language that was developed in the late 1980s for the Motorola 88000 CPU and Unix by Max Reason. In the early 1990s it was ported to Windows and Linux, and since 1999 it has been available as open source… …   Wikipedia

  • List of programming languages by category — Programming language lists Alphabetical Categorical Chronological Generational This is a list of programming languages grouped by category. Some languages are listed in multiple categories. Contents …   Wikipedia

Share the article and excerpts

Direct link
Do a right-click on the link above
and select “Copy Link”