2 Copyright © 1995-2014, The AROS Development Team. All rights reserved.
14 static char text1
[] = "1.3 1 string";
15 static char text2
[] = "NO_NUMBERS_TEXT";
16 static char text3
[] = "FSOMETHING";
17 static char text4
[] = "0xAF"; /* Hex integer */
18 static char text5
[] = "xAF"; /* "Hex integer" without 0 */
19 static char text6
[] = "AF"; /* "Hex integer" without 0x */
23 cnt
= sscanf(text1
, "%f %d %s", &f
, &i
, s
);
27 TEST(strcmp(s
, "string") == 0);
30 cnt
= sscanf(text2
, "%i", &i
);
35 cnt
= sscanf(text3
, "%i", &i
);
40 cnt
= sscanf(text4
, "%i", &i
);
45 cnt
= sscanf(text5
, "%i", &i
);
50 cnt
= sscanf(text6
, "%i", &i
);
54 cnt
= sscanf("0.1", "%f", &f
);
57 cnt
= sscanf(".1", "%f", &f
);
60 cnt
= sscanf("1", "%f", &f
);
63 cnt
= sscanf("-.1", "%f", &f
);
66 cnt
= sscanf("x", "%f", &f
);