enhanced split(),ENVIRON,ARGV in awk to build a numeric string if a string can be converted to a number

This commit is contained in:
2013-05-29 08:46:23 +00:00
parent 15300bfcfc
commit fc18cd2db6
9 changed files with 81 additions and 34 deletions

View File

@ -766,8 +766,10 @@ static int fnc_split (qse_awk_rtx_t* run, const qse_awk_fnc_info_t* fi)
QSE_ASSERT ((tok.ptr != QSE_NULL && tok.len > 0) || tok.len == 0);
/* create the field string */
t2 = qse_awk_rtx_makestrvalwithcstr (run, &tok);
/* create the field string - however, the split function must
* create a numeric string if the string is a number */
/*t2 = qse_awk_rtx_makestrvalwithcstr (run, &tok);*/
t2 = qse_awk_rtx_makenstrvalwithcstr (run, &tok);
if (t2 == QSE_NULL) goto oops;
/* put it into the map */