S=(char uchar int16 uint16 int32 uint32 int64 uint64 float double std_string) for ((i=0;i<${#S[*]};i++)) ; do echo ""; echo '//========= Test '${S[$i]}'=============' echo "try{" echo ${S[$i]} a$i = $1.to_${S[$i]}"();" ; echo 'std::cerr<<"to '${S[$i]}' successful, value = "<