scanf


Description:

[ CCode ( cname = "fscanf" ) ]
[ ScanfFormat ]
public int scanf (string format, ...)

Reads the data from stream.

Example: Read a formatted string:

static int main (string[] args) {
int num = 0;
print ("What's your favorite integer?\n");
stdin.scanf ("%d", &num);
print ("%d? Really?\n", num);
return 0;
}

valac --pkg glib-2.0 GLib.FileStream.scanf.vala

Parameters:

format

character string specifying how to read the input (See GLib.FileStream.printf)

...

receiving arguments