Sample code for 30+ languages & platforms
Zig

Get Version of Chilkat

Demonstrate how to find out the version of Chilkat at runtime.

Chilkat Zig Downloads

Zig
const std = @import("std");
const chilkat = @import("chilkat");

pub fn main(init: std.process.Init) !void {
    const alloc = init.arena.allocator();

    // Most Chilkat classes include a Version property.
    // To find the version of Chilkat, such as "9.5.0.94",
    // instantiate the object and examine the Version property.

    // For example:
    const sftp = try chilkat.SFtp.init();
    defer sftp.deinit();
    const chilkat_version = try sftp.getVersion(alloc);
    std.debug.print("{s}\n", .{chilkat_version});

    // Most other Chilkat classes also have the Version property
    // For example:
    const json = try chilkat.JsonObject.init();
    defer json.deinit();
    std.debug.print("{s}\n", .{try json.getVersion(alloc)});
}