Index: libcfa/src/common.hfa
===================================================================
--- libcfa/src/common.hfa	(revision 419985ca0c74e8bdddbbf6e8a4d070fe5b2e9d94)
+++ libcfa/src/common.hfa	(revision 76acb60978c56c8dc53fd1e2b2ae95443c25a3a6)
@@ -10,6 +10,6 @@
 // Created On       : Wed Jul 11 17:54:36 2018
 // Last Modified By : Peter A. Buhr
-// Last Modified On : Sat Aug  5 11:52:08 2023
-// Update Count     : 26
+// Last Modified On : Sat Aug  5 13:05:27 2023
+// Update Count     : 32
 //
 
@@ -17,5 +17,5 @@
 
 // TEMPORARY
-#define Exception( name ) exception name{}; static vtable( name ) name ## _vt
+#define Exception( name ) exception name{}; vtable( name ) name ## _vt
 #define Throw( name ) throw (name){ &name ## _vt }
 
Index: libcfa/src/stdlib.cfa
===================================================================
--- libcfa/src/stdlib.cfa	(revision 419985ca0c74e8bdddbbf6e8a4d070fe5b2e9d94)
+++ libcfa/src/stdlib.cfa	(revision 76acb60978c56c8dc53fd1e2b2ae95443c25a3a6)
@@ -10,6 +10,6 @@
 // Created On       : Thu Jan 28 17:10:29 2016
 // Last Modified By : Peter A. Buhr
-// Last Modified On : Thu Feb 16 16:31:34 2023
-// Update Count     : 633
+// Last Modified On : Sat Aug  5 11:53:43 2023
+// Update Count     : 637
 //
 
@@ -65,5 +65,19 @@
 //---------------------------------------
 
-float _Complex strto( const char sptr[], char ** eptr ) {
+static vtable(out_of_range) out_of_range_vt;
+static vtable(invalid_argument) invalid_argument_vt;
+
+forall( T | { T strto( const char sptr[], char * eptr[], int ); } )
+T convert( const char sptr[] ) {
+	char * eptr;
+	errno = 0;											// reset
+	T val = strto( sptr, &eptr, 10 );					// attempt conversion
+	if ( errno == ERANGE ) Throw( out_of_range );
+	if ( eptr == sptr ||								// conversion failed, no characters generated
+		 *eptr != '\0' ) Throw( invalid_argument );		// not at end of str ?
+	return val;
+} // convert
+
+float _Complex strto( const char sptr[], char * eptr[] ) {
 	float re, im;
 	char * eeptr;
@@ -76,5 +90,5 @@
 } // strto
 
-double _Complex strto( const char sptr[], char ** eptr ) {
+double _Complex strto( const char sptr[], char * eptr[] ) {
 	double re, im;
 	char * eeptr;
@@ -87,5 +101,5 @@
 } // strto
 
-long double _Complex strto( const char sptr[], char ** eptr ) {
+long double _Complex strto( const char sptr[], char * eptr[] ) {
 	long double re, im;
 	char * eeptr;
Index: libcfa/src/stdlib.hfa
===================================================================
--- libcfa/src/stdlib.hfa	(revision 419985ca0c74e8bdddbbf6e8a4d070fe5b2e9d94)
+++ libcfa/src/stdlib.hfa	(revision 76acb60978c56c8dc53fd1e2b2ae95443c25a3a6)
@@ -10,6 +10,6 @@
 // Created On       : Thu Jan 28 17:12:35 2016
 // Last Modified By : Peter A. Buhr
-// Last Modified On : Thu Feb  2 11:30:04 2023
-// Update Count     : 766
+// Last Modified On : Sat Aug  5 11:53:42 2023
+// Update Count     : 774
 //
 
@@ -22,5 +22,5 @@
 #include <stdlib.h>										// *alloc, strto*, ato*
 #include <heap.hfa>
-
+#include <errno.h>
 
 // Reduce includes by explicitly defining these routines.
@@ -294,19 +294,25 @@
 
 static inline {
-	int strto( const char sptr[], char ** eptr, int base ) { return (int)strtol( sptr, eptr, base ); }
-	unsigned int strto( const char sptr[], char ** eptr, int base ) { return (unsigned int)strtoul( sptr, eptr, base ); }
-	long int strto( const char sptr[], char ** eptr, int base ) { return strtol( sptr, eptr, base ); }
-	unsigned long int strto( const char sptr[], char ** eptr, int base ) { return strtoul( sptr, eptr, base ); }
-	long long int strto( const char sptr[], char ** eptr, int base ) { return strtoll( sptr, eptr, base ); }
-	unsigned long long int strto( const char sptr[], char ** eptr, int base ) { return strtoull( sptr, eptr, base ); }
-
-	float strto( const char sptr[], char ** eptr ) { return strtof( sptr, eptr ); }
-	double strto( const char sptr[], char ** eptr ) { return strtod( sptr, eptr ); }
-	long double strto( const char sptr[], char ** eptr ) { return strtold( sptr, eptr ); }
-} // distribution
-
-float _Complex strto( const char sptr[], char ** eptr );
-double _Complex strto( const char sptr[], char ** eptr );
-long double _Complex strto( const char sptr[], char ** eptr );
+	int strto( const char sptr[], char * eptr[], int base ) { return (int)strtol( sptr, eptr, base ); }
+	unsigned int strto( const char sptr[], char * eptr[], int base ) { return (unsigned int)strtoul( sptr, eptr, base ); }
+	long int strto( const char sptr[], char * eptr[], int base ) { return strtol( sptr, eptr, base ); }
+	unsigned long int strto( const char sptr[], char * eptr[], int base ) { return strtoul( sptr, eptr, base ); }
+	long long int strto( const char sptr[], char * eptr[], int base ) { return strtoll( sptr, eptr, base ); }
+	unsigned long long int strto( const char sptr[], char * eptr[], int base ) { return strtoull( sptr, eptr, base ); }
+
+	float strto( const char sptr[], char * eptr[] ) { return strtof( sptr, eptr ); }
+	double strto( const char sptr[], char * eptr[] ) { return strtod( sptr, eptr ); }
+	long double strto( const char sptr[], char * eptr[] ) { return strtold( sptr, eptr ); }
+} // distribution
+
+float _Complex strto( const char sptr[], char * eptr[] );
+double _Complex strto( const char sptr[], char * eptr[] );
+long double _Complex strto( const char sptr[], char * eptr[] );
+
+exception out_of_range {};
+exception invalid_argument {};
+
+forall( T | { T strto( const char sptr[], char * eptr[], int ); } )
+T convert( const char sptr[] );
 
 static inline {
