Module Loading

From OnixOS

O Language files is to simple. File extension “.olm”. Let’s start by examining the programming language example.

hello.olm (as hello module):

def hello = fn(name){ 
  output("Hello, "+name+"! Welcome to Olang")
}

load.ola (main file):

load "hello.olm"
def name = "Oytun";
hello(name);

Run:

$ olang load.ola

Output:

Hello, Oytun! Welcome to Olang