Skip to content

First Program

Vihan edited this page Feb 22, 2018 · 2 revisions

Getting started in VSL is easy. Unlike Java or C, you do not need to import libraries or write long boilerplate code to do something simple. Let's take a look at the classic "Hello, World!" program:

print("Hello, World!")

print is a function declared by the VSL standard library (aka libvsl). It takes a VSL String instance and outputs it to the console followed by a newline. A VSL string is a minor wrapper around a typical byte sequence. VSL Strings support unicode, and arbitrary encodings, if you which to interact with an ASCII-byte sequence using VSL string functions, you can instead use String<ASCIIView>. StringViews are elaborated more in their respective section.