Skip to content

Basic Tutorial

Luis Albizo edited this page Aug 25, 2018 · 30 revisions

Syntaxis

Variables

A variable in wardscript can contain letters a-z, A-Z### , numbers: 0-9, and a few special symbols: _ $ '.

a := 12;
b := a, c := b;

Data Types

There is only 4 data types in wardscript:

  • Byte
  • Nil
  • Node
  • Function

Byte

A byte is a unsigned integer lesser than 256;

Nil

Node

In dynamic data structures, a node is a record that contains a data of interest and at least one pointer to reference to another node.

A node in wardscript is similar to a structure in c, but dynamically typed as in python or lua (dictionary and table), it differs from these by being immutable; which means that once a node is created, it can not have new members or eliminate those that already exist, only modify its content

Function

Control Flow

If clauses

Loops

A loop is equivalent to a while True or a while (1)

Clone this wiki locally