Creative Basic
Encyclopedia
Creative Basic is a third-generation
Third-generation programming language
A third-generation programming language is a refinement of a second-generation programming language. The second generation of programming languages brought logical structure to software. The third generation brought refinements to make the languages more programmer-friendly...

 event-driven programming language for Windows
Microsoft Windows
Microsoft Windows is a series of operating systems produced by Microsoft.Microsoft introduced an operating environment named Windows on November 20, 1985 as an add-on to MS-DOS in response to the growing interest in graphical user interfaces . Microsoft Windows came to dominate the world's personal...

, with an integrated development environment
Integrated development environment
An integrated development environment is a software application that provides comprehensive facilities to computer programmers for software development...

 (IDE).

Current version executables are interpreted
Interpreter (computing)
In computer science, an interpreter normally means a computer program that executes, i.e. performs, instructions written in a programming language...

 and require no runtime libraries be installed on the end-user's computer. A planned future version will have compiled
Compiled language
A compiled language is a programming language whose implementations are typically compilers , and not interpreters ....

 executables.

Creative Basic has an extensive command set, and access to the application programming interface
Application programming interface
An application programming interface is a source code based specification intended to be used as an interface by software components to communicate with each other...

 (API) libraries available in the Microsoft Windows
Microsoft Windows
Microsoft Windows is a series of operating systems produced by Microsoft.Microsoft introduced an operating environment named Windows on November 20, 1985 as an add-on to MS-DOS in response to the growing interest in graphical user interfaces . Microsoft Windows came to dominate the world's personal...

 operating system
Operating system
An operating system is a set of programs that manage computer hardware resources and provide common services for application software. The operating system is the most important type of system software in a computer system...

.

Although this modern version dates from 2007, it is a development from, and is completely compatible with IBasic, which has been in use worldwide since 2002.

Some notable projects are Jerry Muelver's WikiWriter, a WikiWriter to Chm Wizard by Alyce Watson, and Mike Rainey's metal machining program. (see the Links below).

Example programs

"Hello" program:

print "hello"


Program to open a Console window and print 10 random numbers:

openconsole

for i = 1 to 10
x = Rnd(100)
print x
next i

do:until inkey$<>""
closeconsole
end



Program to create a GUI
Gui
Gui or guee is a generic term to refer to grilled dishes in Korean cuisine. These most commonly have meat or fish as their primary ingredient, but may in some cases also comprise grilled vegetables or other vegetarian ingredients. The term derives from the verb, "gupda" in Korean, which literally...

window with an Exit button and event handling routine:


def w:WINDOW
def wstyle:INT

wstyle = @SIZE|@MINBOX|@MAXBOX

WINDOW w,50,50,800,600,wstyle,0,"Window Title",main
SETWINDOWCOLOR w,RGB(0,0,90)

CONTROL w,"B,Exit,(800-80)/2, 500, 80, 40, 0, 1"
WAITUNTIL w = 0
END

SUB main
SELECT @CLASS
case @IDCLOSEWINDOW
closewindow w
' clicking the Exit button ...
case @IDCONTROL
select @CONTROLID
case 1
closewindow w
endselect
endselect
RETURN


External links

The source of this article is wikipedia, the free encyclopedia.  The text of this article is licensed under the GFDL.
 
x
OK