func setField(_ fieldno: Int, asString string: String?, asDouble value: Double)

Function setField() puts values to a field in memory before writing a record to a disc.
There are different versions of setField: you can pass a double value, a string or both. In last case setField will use a value which is more suitable for this type of field.


{
    // your code
    dbf.clearRecord()
    dbf.setField(0, asString:"string value")
    dbf.setField(1, asDouble:123.45)
    dbf.setField(2, asString:"the string", asDouble:666.66)
    dbf.writeRecord(0)
    // your code
}