FORMAT


Description:

[ CCode ( cname = "G_GINT64_FORMAT" ) ]
public const string FORMAT

This is the platform dependent conversion specifier for scanning and printing values of type int64 .

See also g_gint16_format.

Some platforms do not support scanning and printing 64-bit integers, even though the types are supported. On such platforms g_gint64_format is not defined. Note that scanf may not support 64-bit integers, even if g_gint64_format is defined. Due to its weak error handling, scanf is not recommended for parsing anyway; consider using ascii_strtoull instead.

Example: printf, int64:

public static int main (string[] args) {
// Output: ``10``
int64 val = 10;
print ("%" + int64.FORMAT + "\n", val);
return 0;
}

valac --pkg glib-2.0 int64.FORMAT.vala



2022 vala-language.org