Monkey

This book is meant to be a reference for the BASIC dialect Monkey, published by Blitz Research Ltd.

History

Monkey is a BASIC dialect programming language that translates Monkey code into multiple cross-platforms. Currently the supported target platforms include Windows, Mac OS X, Android, iOS, HTML5, Flash and XNA.

Monkey is the latest programming language by Blitz Research Limited, following BlitzMax (2004) and BlitzBasic (2000), two prior BASIC programming dialects from the same author.

Compilation

Monkey code is translated into the target language via the Trans tool and into a native compiler depending on the target platform. Monkey requires the use of other compilers and development kits to reach the end target. This process is largely automated with the accompanying IDE, Monk (2011) and Ted (2012).

Modules

Modules provide the runtime functionality of Monkey. They are stored in the modules directory inside the Monkey directory, and accessed via the Import commands.

Code Example

Function Main:Bool()
	Local hex:Int = $f0c090

	HexToColour(hex)
	
	Return True
End Function

Function HexToColour:Void(hex:Int)
	Local r:Int = hex Shr 16 & $0000ff
	Local g:Int = hex Shr 8 & $0000ff
	Local b:Int = hex & $0000ff
	
	Print r+":"+g+":"+b
End

References

  • Third-Party Modules
Category:Subject:BASIC programming language/all books Category:Subject:Computer programming languages/all books Category:Subject:Computer programming/all books Category:Subject:Computer science/all books Category:Subject:Computing/all books Category:Subject:Books by subject/all books Category:Subject:Computing/all books Category:Subject:Books by subject/all books Category:Book:Monkey#%20 Category:Book:Wikibooks Stacks/Books#MonkeyCategory:Shelf:BASIC programming language Category:Shelf:BASIC programming language/all books Category:Shelf:Computer programming/all books#Computer%20programming Category:Shelf:Computer programming languages/all books#Computer%20programming%20languages Category:Shelf:Computer science/all books#Computer%20science Category:Department:Computing/all books#Computing Category:Alphabetical/M Category:Freshly started booksCategory:Books by completion status/all books
Category:Alphabetical/M Category:Book:Monkey Category:Book:Wikibooks Stacks/Books Category:Books by completion status/all books Category:Department:Computing/all books Category:Freshly started books Category:Shelf:BASIC programming language Category:Shelf:BASIC programming language/all books Category:Shelf:Computer programming/all books Category:Shelf:Computer programming languages/all books Category:Shelf:Computer science/all books Category:Subject:BASIC programming language Category:Subject:BASIC programming language/all books Category:Subject:Books by subject/all books Category:Subject:Computer programming/all books Category:Subject:Computer programming languages/all books Category:Subject:Computer science/all books Category:Subject:Computing/all books