Skip to content

Latest commit

 

History

History
80 lines (57 loc) · 1.34 KB

README.md

File metadata and controls

80 lines (57 loc) · 1.34 KB

divine

Divine is a new server side general purpose, high level programming language for those who are familiar with javascript and the extension would be .di

The language is under construction but super exited to share some of the syntaxes. This would be a intepreted language designed by c++ and may be in future this would be a compiled language.

Note

Looking for contributors to support in community

Variables

var variable_1 = 10;
var variable_2 = "Hello";
var variable_3 = 'D';
var variable_4 = true;
var variable_5 = 10.90;

var variable_6 = Integer(10);
var variable_7 = String("Hello");
var variable_8 = Char('H');
var variable_9 = Boolean(true);
var variable_10 = Float(10.38);

Functions

my_function_1(){
  print("Hi, Welcome to Divine");
}

my_function_2(a){
  print("Value of a is:"+a);
}

my_function_3(a: Integer()){
  print("Value of a is:"+a);
}

Classes

Address(street_no, street_name, city){

}

Person(id, name, age, Address){
  
}

Inheritance

Student(school_name, class_name, marks) extends Student{

}

Student(school_name, class_name, marks) extends Student(id,name,age){

}

import statements

import("core")
import("math")
import("io")

objects

var address_1 = Address(19, "Street Name", "City");
var std_1 = Person(10,"Haris", 24, address_1);