# Cab type conversions

From Tracker Software PDF SDK

Generally, Cab node is allowed to be queried for or assigned with a value of type that is different from the node type, within the limitations of the following type conversions rules:

Source type | Destination type | ||||||||
---|---|---|---|---|---|---|---|---|---|

dt_Bool | dt_Int | dt_Int64 | dt_Double | dt_String | dt_Stream | dt_IUnknown | dt_Array | dt_Dictionary | |

dt_Bool | Direct | true -> 1, false -> 0 | true -> 1, false -> 0 | N/A | true -> "true", false -> "false" | N/A | N/A | N/A | N/A |

dt_Int | (value == 0) -> false, (value == 1) -> true | Direct | Direct | standard integer -> double conversion | standard integer -> string conversion | N/A | N/A | N/A | N/A |

dt_Int64 | (value == 0) -> false, (value == 1) -> true | Direct | Direct | standard integer -> double conversion | standard integer -> string conversion | N/A | N/A | N/A | N/A |

dt_Double | N/A | lossless double->integer conversion (if possible) | lossless double->integer conversion (if possible) | Direct | standard double->string converison | N/A | N/A | N/A | N/A |

dt_String | "true" (case insensitive) -> true, "false" (case insensitive) -> false | standard string->integer conversion (if possible) | standard string->integer conversion (if possible) | standard string -> double conversion (if possible) | Direct | N/A | N/A | N/A | N/A |

dt_Stream | N/A | N/A | N/A | N/A | N/A | Direct | N/A | N/A | N/A |

dt_IUnknown | N/A | N/A | N/A | N/A | N/A | N/A | Direct | N/A | N/A |

dt_Array | N/A | N/A | N/A | N/A | N/A | N/A | N/A | Direct | N/A |

dt_Dictionary | N/A | N/A | N/A | N/A | N/A | N/A | N/A | N/A | Direct |