Occultlang Docs

Keywords

Occult has 17 keywords in the language, which makes it fairly simple to learn.

fn  if  else  elseif(else if)  loop  when  do  return  break  continue  while  for  include  array  in  false  true

Types

Occult also has a basic type system for now, and these are the only supported types as of now.

i64  i32  i16  i8  u64  u32  u16  u8  f64  f32  bool  char  string

There will be other additions in the future, such as generics, and other things which a modern language would use.

Functions

Here is an example on how to write a function.

fn add(i64 x, i64 y) i64 {
  return x + y;
}

fn main() i64 {
  return add(10, 30);
}

Occult does not have a void type! Functions such as the main function rely on an integer type.