# Declaring variables and using data types in Julia

# 5 basic types of data:
# Integers, Floating point numbers, booleans, strings, and characters

# Variable names typically are lowercase. Use underscores if the name
# is too long to be easily read.
first = 1
second = 2.0
stringVar = "This is a string"
initial = 'J'
boolVal = true

println(first)
println(second)
println(stringVar)
println(initial)
println(boolVal)

# Variables can be redefined and change type
first = 1.0
println(first)

# Strings have to be in double quotes. This will error: anotherString = 'hello world'

# Constant values are declared with const and are all uppercase
# Note: this is only useful in the global scope
const CONSTANT = 42

# Constants of the same type *can* be reassigned, but with a warning
CONSTANT = 43

# Constants of different types cannot be reassigned, this is an error
# Cannot do: CONSTANT = 43.0

# Type Annotation identifies a variable as a particular type
function testFunc()
    x::String = "some string"    
end

testFunc()