From Esolang
Jump to navigation Jump to search

V-- is an interpreted high-level programming language created by Marcus Kaiser in 2007.


V-- is currently an interpreted language, using the "V-- Programming Language Interpreter 0.1", shortened "V-- PLI.1". V--'s goal is to "encourage the free will of the programmer.", which is quite contradictory to a statement made in "The V-- Programming Language 0.1" (The official manual/language reference): "V-- is unforgiving. One little sidestep and it eats you alive".

According to the manual the language is very logical, yet "to understand V--, one must abandon all their earlier definitions of 'logic'".

Variables and data types

V-- uses (in version 0.2.1) four variables, &a, &b, &c and &d. The variables &a and &b are of "num" (integer) type, and &c and &d are of string type.

Commands and syntax

V-- command types and "command type operators". V-- has currently (in version 0.1) four command types:

  • The string/print command (=)
  • The variable command (&)
  • The arithmetic command (#)
  • The comment command (!)

Each command must be prefixed with it's command type operator:

= Hello,World!

The above command demonstrates the famous "Hello World" program in V--. The string/print command type in V-- cannot contain spaces, therefore the program is somewhat modified. The output being:


A V-- program demonstrating the declaration of variables and the string/print command type operator:

&			! Declares the variable command type
    -> .		! Declares the num data type
        -> &a		! Declares the variable
            -> 12	! Assigns a value to the variable
{ .&a $ 12 }		! Output of the variable information

= &a			! Prints the variable's contents

The above program can also be written like this:

& . &a 12
= &a

As source code interpretation probably will be implemented in version 0.4, the code could be written like the above one and then interpreted. V-- PLI.1 is very picky about spacing.

Arithmetic operations have to be prefixed with their "sub-command operator":

# + 3 5

Gives the output:

{ 3 + 5 $ 8 }

External resources