1
下面的代碼在早期版本的Swift中工作,現在編譯器拒絕它。 我需要這個函數來從ObjectiveC與Swift交互。在Swift 3中寫入UnsafeMutablePointer
@objc public static func myFunc(jdUT: Double, _ lon: Double, _ lat: Double,
_ dayLen: Double, _ SbhDeg: Double, _ MgrbDeg: Double,
omsk: UnsafeMutablePointer<Double>)
{
var z = somefuncion()
// this line gives this error : Cannot assign to property: 'omsk' is a 'let' constant
omsk.memory=z;
}