// exsw1.swift first example simple output integer, string, double // note // makes rest of line a comment // note statement ; statement one same line OK // note some operators require space operator space // or operator with no spaces #if os(OSX) || os(iOS) // for libraries, portable for OSX and Linux import Foundation #elseif os(Linux) import Glibc #endif// var i = 7 // declare variable i with initial value 7 // var j= 8 // error need space = space var j=8 // OK with no spaces var k = 9; let m = 10 // two statements on one line let ac = "a" // single character, let makes ac unchangeable var msg = "sample string" // declare msg with string in quotes var x = 37.95 // declare floating point x with initial value var y = 127.34e10 // declare double precision with initial value print("exsw1.swift running"); // simple print title print("i= \(i)"); // \( ) for any type print("ac= \(ac)"); // \( ) for any type print("msg= \(msg)"); // \( ) for any type print("x= \(x)"); // \( ) for any type print("y= \(y)"); // \( ) for any type print("sin(1.0)= \(sin(1.0))") // \( ) for functions