Changes in libcfa/src/stdlib.cfa [f8729be:b5e725a]
- File:
-
- 1 edited
-
libcfa/src/stdlib.cfa (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
libcfa/src/stdlib.cfa
rf8729be rb5e725a 10 10 // Created On : Thu Jan 28 17:10:29 2016 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Thu Feb 16 16:31:34202313 // Update Count : 6 3312 // Last Modified On : Mon Aug 14 18:22:36 2023 13 // Update Count : 642 14 14 // 15 15 … … 65 65 //--------------------------------------- 66 66 67 float _Complex strto( const char sptr[], char ** eptr ) { 67 forall( T | { T strto( const char sptr[], char * eptr[], int ); } ) 68 T convert( const char sptr[] ) { 69 char * eptr; 70 errno = 0; // reset 71 T val = strto( sptr, &eptr, 10 ); // attempt conversion 72 if ( errno == ERANGE ) throw ExceptionInst( out_of_range ); 73 if ( eptr == sptr || // conversion failed, no characters generated 74 *eptr != '\0' ) throw ExceptionInst( invalid_argument ); // not at end of str ? 75 return val; 76 } // convert 77 78 float _Complex strto( const char sptr[], char * eptr[] ) { 68 79 float re, im; 69 80 char * eeptr; … … 76 87 } // strto 77 88 78 double _Complex strto( const char sptr[], char * * eptr) {89 double _Complex strto( const char sptr[], char * eptr[] ) { 79 90 double re, im; 80 91 char * eeptr; … … 87 98 } // strto 88 99 89 long double _Complex strto( const char sptr[], char * * eptr) {100 long double _Complex strto( const char sptr[], char * eptr[] ) { 90 101 long double re, im; 91 102 char * eeptr;
Note:
See TracChangeset
for help on using the changeset viewer.