level 1
public static func +=(lhs: inout Int, rhs: Int)
/// Subtracts the second value from the first and stores the difference in the
/// left-hand-side variable.
///
/// The difference of the two arguments must be representable in the
/// arguments' type. In the following example, the result of `21 - 50` is
/// less than zero, the minimum representable `UInt8` value:
///
/// var x: UInt8 = 21
/// x - 50
/// // Overflow error
///
/// - Note: Overflow checking is not performed in `-Ounchecked` builds.
///
/// - Parameters:
/// - lhs: A numeric value.
/// - rhs: The value to subtract from `lhs`.
public static func -=(lhs: inout Int, rhs: Int)
/// Multiplies two values and stores the result in the left-hand-side
/// variable.
///
/// The product of the two arguments must be representable in the arguments'
/// type. In the following example, the result of `21 * 21` is greater than
/// the maximum representable `Int8` value:
///
/// var x: Int8 = 21
/// x * 21
/// // Overflow error
///
/// - Note: Overflow checking is not performed in `-Ounchecked` builds.
///
/// - Parameters:
/// - lhs: The first value to multiply.
/// - rhs: The second value to multiply.
public static func *=(lhs: inout Int, rhs: Int)
/// Divides the first value by the second and stores the quotient in the
/// left-hand-side variable.
///
/// For integer types, any remainder of the division is discarded.
///
/// var x = 21
/// x /= 5
/// // x == 4
///
/// - Parameters:
/// - lhs: The value to divide.
/// - rhs: The value to divide `lhs` by. `rhs` must not be zero.
public static func /=(lhs: inout Int, rhs: Int)
/// Returns the quotient of dividing this value by the given value along with
/// a flag indicating whether overflow occurred in the operation.
///
/// Dividing by zero is not an error when using this method. For a value `x`,
/// the result of `x.dividedReportingOverflow(by: 0)` is `(x, true)`.
///
/// - Parameter rhs: The value to divide this value by.
/// - Returns: A tuple containing the result of the division along with a
/// Boolean value indicating whether overflow occurred. If the `overflow`
/// component is `false`, the `partialValue` component contains the entire
/// quotient. If the `overflow` component is `true`, an overflow occurred
/// and the `partialValue` component contains the truncated quotient.
2018年04月07日 06点04分
7
level 1
Command-line calculator的作业?
2018年04月08日 09点04分
8
level 12
ITunesU 里的Stanford 大学swift教程,前两个视频就是做计算器
2018年04月17日 03点04分
10
level 1
你准备纯代码写计算器吗?这个拉点Button做tag很容易的。我也是新手,就是写的代码有点啰嗦。
2018年05月11日 05点05分
11
纯代码写,已经写出来了,谢谢老铁!
2018年05月11日 10点05分