Fixed and interpolated String literals
The complete source of builtInTypes_string_literals.ek9, compiled by the EK9 compiler. Shown on builtInTypes.html.
#!ek9 defines module site.builtintypes.stringliterals defines program StringLiterals() stdout <- Stdout() //Declare a fixed String literal language <- "EK9" //Declare a variable to be used in an interpolated String age <- 30 //Use the variable in an interpolated String message <- `Your age is ${age}` stdout.println(`${language} ${message}`)
Download builtInTypes_string_literals.ek9
Output
EK9 Your age is 30