Skip to content

Latest commit

 

History

History
72 lines (47 loc) · 2.07 KB

README.md

File metadata and controls

72 lines (47 loc) · 2.07 KB

Basic Info

Name: Julia

Creator(s): Jeff Bezanson, Stefan Karpinski, Viral B. Shah, Alan Edelman and others.

Date: 2012

Website: julialang.org

Intro

Julia is a high-level, high-performance, dynamic programming language. While it is a general-purpose language and can be used to write any application, many of its features are well suited for numerical analysis and computational science.

Syntax

Declaring a variable in Julia is easy, all you need is the name of the variable followed by an = sign and the value.

name = "Jacob"
num = 42

If/Else statements in Julia are similar to other languages except that no brackets are required around the condition or curly braces around the body. The statement is ended with the keyword end.

if true
    println("True!")
elseif false
    println("False!")
else
    println("WTF?!")
end

Julia provides a variety of loop types, a simple for loop is shown below.

for x in 1:10
    y = x^2
    println("$(x) squared is $(y)")
end

Functions in Julia are declared with the keyword function and ended with the keyword end, see the example below.

function area(width, height)
    return width * height
end

println(area(12, 34))

Libraries

More Info