VisageScript is a programming language coded in Python with a mix of Python, Java, JavaScript, and Ruby syntax and functionalities.
Variables in VisageScript can be declared as either static or dynamic-typed.
For dynamic-typed variable declaration, we use the keyword 'var'. In this case, it is possible to update the value of the variable to another type's value. The following code shows that the variable 'a' can have its type changed from 'int' to 'float'.
var a = 5; a = 6.5; print a; |
The code above will print the value '6.5'.
Static-typed variable declaration involves directly specifying the type of the variable declared. So far, VisageScript supports 'int' and 'float' types. Since both 'int' and 'float' are numeric data types, all basic arithmetic operations and comparison operations can be applied between them.
The following code adds an 'int' and a 'float'.
int a = 5; float b = 6.5; print a + b; |
The code above will print the value '11.5'.
The executable file for VisageScript runner can be downloaded at Executable File.
Python code used to create VisageScript programming language is available in Source Code.
Python unit tests created using Python's "unittest" module, testing some VisageScript code snippets is available in Unit Tests.
pip install VisageScript
First, open by double-clicking the file "VisageScript". How the executable file looks like is shown in the image below (the file is enclosed with a red rectangle).
Once you run the executable file, you will be asked whether you want to continue using VisageScript runner or not.
You will be asked to enter the path of the VisageScript (.vsgsc file) you want to run in the runner. The output of the VisageScript program will be printed on the terminal. In the image below, the output of the VisageScript file "example1.vsgsc" is printed.