Dagger Lang

Introduction

Main Documentation:


Working with Dagger
Dagger Values
User Input

Builtin Functions:


Lambda
Set
Put
List
Head
Tail
Eval
Join
Addition
Subtraction
Multiplication
Division
Modulo
Power
If
Equals
Not Equal
Greater Than
Less Than
Greater Than or Equal
Less Than or Equal
Read Integer
Read Decimal
Read String
Load
Error
Print

Working with Dagger


After executing the interpreter with the "dagger" command, you will be presented with the following:


    Dagger Version x.x.x.x.x
    Press Ctrl+c to Exit

    dagger> 

You can run lines of code by writing them after "dagger> "


    dagger> print "Hello World"
    Hello World

Polish Notation


Dagger uses Polish Notation in order to perform more complex mathematical operations. You can read more about it here.

Evaluating External Files


You can evaluate external files in two ways:

  1. Run the interpreter with the name of the file:
  2. 
        dagger hello.dgr
        Hello
    
    
  3. Run the load function from inside the interpreter prompt:
  4. 
        dagger> load "hello.dgr"
        Hello
    
    

Note:

In order for expressions to be evaluated in external files, they must be written inside parentheses:


    # This will not be evaluated:
    print "Hello World!" 

    # This will be evaluated:
    (print "Hello World!")