SCValue
Protocol for data handling.
SCBool(value)
Scorocode Boolean type
Parameters
Parameter | Type | Properties | Description | Value example |
---|---|---|---|---|
value | Bool |
Mandatory | Logical value | true or false |
let dataBool = SCBool(true)
SCString(value)
Scorocode String type
Parameters
Parameter | Type | Properties | Description | Value example |
---|---|---|---|---|
value | String |
Mandatory | String value | "This is string" |
let dataString = SCString("AbCdE")
SCInt(value)
Scorocode Boolean type
Parameters
Parameter | Type | Properties | Description | Value example |
---|---|---|---|---|
value | Int |
Mandatory | Integer value | -42 |
let dataInt = SCInt(5)
SCDouble(value)
Scorocode Double type
Parameters
Parameter | Type | Properties | Description | Value example |
---|---|---|---|---|
value | Double |
Mandatory | Floating-point value | 3.1415926 |
let dataDouble = SCDouble(3.1415926)
SCDate(value)
Scorocode Date type
Parameters
Parameter | Type | Properties | Description | Value example |
---|---|---|---|---|
value | NSDate |
Mandatory | Date value | 2016-05-31 |
let dataDate = SCDate(dateFormatter.dateFromString("2016-05-31")!)
SCArray(value)
Scorocode Boolean type
Parameters
Parameter | Type | Properties | Description | Value example |
---|---|---|---|---|
value | [SCValue] |
Mandatory | Array value | [SCInt(4), SCInt(8), SCInt(15), SCInt(16), SCInt(23), SCInt(42)] |
let dataBool = SCBool(true)
let dataString = SCString("AbCdE")
let dataInt = SCInt(5)
let dataDouble = SCDouble(3.1415926)
let dataDate = SCDate(dateFormatter.dateFromString("2016-05-31")!)
let dataDictionary = SCDictionary(["name" : dataString, "date" : dataDate])
let dataArray = SCArray([dataBool, dataString, dataInt, dataDouble, dataDate, dataDictionary])
SCDictionary(value)
Scorocode Boolean type
Parameters
Parameter | Type | Properties | Description | Value example |
---|---|---|---|---|
value | [String: SCValue] |
Mandatory | Object with the "key" type of data: "value" | ["key1" : SCString("A"), "key2" : SCString("B")] |
let dataDictionary = SCDictionary(["key1" : SCString("A"), "key2" : SCString("B")])