RosettaCodeData/Task/Variables/Pony/variables-1.pony

9 lines
473 B
Pony

var counter: I32 = 10 // mutable variable 'counter' with value 10
let temp: F64 = 36.6 // immutable variable 'temp'
let str: String // immutable variable 'str' with no initial value
str = "i am a string" // variables must be initialized before use
let another_str = "i am another string" // type of variable 'another_str' infered from assigned value
let b = true
let b' = false // variable names can contain ' to make a distinct variable with almost the same name