18.04.2012, 23:58
Taken straight from the sscanf release thread.
pawn Код:
enum
E_DATA
{
E_DATE_C,
Float:E_DATA_X,
E_DATA_NAME[32],
E_DATA_Z
}
main
{
new
var[E_DATA];
sscanf("1 12.0 Bob c", "e<ifs[32]c>", var);
}
Код:
e - Start of the "enum" type < - Starts the specification of the structure of the enum i - An integer, corresponds with E_DATA_C f - A float, corresponds with E_DATA_X s[32] - A 32 cell string, corresponds with E_DATA_NAME c - A character, corresponds with E_DATA_Z > - End of the enum specification