[code]
//
// main.swift
// t1
//
// Created by liu qing on 15/9/13.
// Copyright (c) 2015年 aha68. All rights reserved.
//

import Foundation

//println("Hello, World!") //output function
//tuple 元组 类似as3里的object
let (x,y) = (1,2)
println("x is \(x) and y is \(y)")

let http404Error = (404,"not found") //定义一个由int和string组成的元组
println(http404Error)

let (code,info) = http404Error
println(code)

let (code2,_) = http404Error // 下划线过滤不需要访问的值
println(code2)

println("code is \(http404Error.0)") //序号访问元素

let h200 = (s:1,t:"ok")
println(h200.1)
[/code]