Changeset 1869
- Timestamp:
- Mar 14, 2005, 5:47:39 AM (20 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/emx/testcase/libc/miscinnotek/strtof-1.c
-
Property cvs2svn:cvs-rev
changed from
1.1
to1.2
r1868 r1869 1 1 #include <stdio.h> 2 #include <stdlib.h> 3 #include <math.h> 4 #include <float.h> 2 5 3 6 int main(void) 4 7 { 5 float th;6 //sscanf("-30", "%f", &th);7 8 char *pszEnd = NULL; 8 th = strtof("-30", &pszEnd); 9 printf("%f\n", th); 9 float th = strtof("-30", &pszEnd); 10 if (th != -30.0) 11 { 12 printf("strtof-1: FAILURE (strtof -> %f)\n", th); 13 return 1; 14 } 10 15 16 th = 0.0; 17 sscanf("-30", "%f", &th); 18 if (th != -30.0) 19 { 20 printf("strtof-1: FAILURE (sscanf -> %f)\n", th); 21 return 1; 22 } 23 24 printf("strtof-1: SUCCESS\n"); 11 25 return 0; 12 26 } -
Property cvs2svn:cvs-rev
changed from
Note:
See TracChangeset
for help on using the changeset viewer.