Introduction Welcome Getting Started My First Program     Troubleshooting and Distributing Transforming Data Interactive Programs     Programming Exercises     Making Games
Documentation Declarations     Procedures     Variables Statements     Flow Control Expressions Libraries     Print     IO     Random     Game Engine
Tutorials Complete Tutorials     Introduction to Programming     Quick Start     Programming Exercises     Programming Games

LIBRARIES


All About the Libraries in Vizzcode





What are Libraries

Libraries are pre-created pieces of code you can import to your programs to help you accomplish specific tasks.

When you import a library, you can call its procedures as if they were created by yourself in your program. So it's important to know all the procedures you have at your disposal by importing each library.

The library may have arbitrarily complex code inside of it to perform its desired behaviors, and only provide a limited, simple interface for you to use.
These interfaces are usually in the form of procedures you call and may also be referred to as the library's API - Application Programming Interface.

In the next section, it's explained how you can import libraries in Vizzcode, and then it's presented a complete list of all the libraries available to you inside Vizzcode, with links to the complete specification of their APIs.




How to Import Libraries

Libraries can be imported through the Text Panel by typing #import "Library Name" in the global scope.
Here is an example of importing the Print library:
#import
"Print"

It's just as simple to import them in the Visual Panel: Create a Import node in the global scope and type the name of the library between double quotes "
Importing Libraries in Vizzcode

Note that libraries can only be imported in the global scope. Because everything in the global score is order-independent you don't have to import a library before the code that uses it, just import it anywhere in the global scope.
main
:: () {
    
print();
}

#import
"Print"

The order of declarations doesn't matter in global scope

The following section shows all the libraries you can import in Vizzcode.




Vizzcode's Libraries

Here is a list of all the libraries you have at your disposal on Vizzcode.
If you want to know all the details on them (like what procedures they offer you), you can follow their links.

Print

The Print library allow you easily print messages and values to the console window.

IO

The IO library has procedures for displaying messages and values to the console window (exactly like the print library) and procedures to read user input (text and numbers) in the console window.

Random

The Random library allows you to generate pseudo-random integer and float numbers.

GameEngine

The GameEngine library is used to create video games (or other graphical applications). It has a myriad of procedures to help you create your projects.