Subroutine Type |
Utility/Data Access |
||||||
Definition |
Converts string data into double or double array. |
||||||
Use |
The function can be called by any user-defined subroutine. |
||||||
Calling Syntax |
FortranCALL STR2DBLARY(STRG, ARRAY, NSIZE, ISTAT)
Cc_str2dblary(strg, array, nsize, istat)
Python[array, istat] = py_str2dblary(strg)
MATLAB[array, istat] = m_str2dblary(strg) |
||||||
Input Arguments |
[string] STRG |
A string variable containing the data to be converted into double precision numbers. |
|||||
Output Values |
[double] ARRAY |
The string data, converted into a double precision array. |
|||||
[integer] NSIZE |
Returns the number of double precision numbers found in the string, separated by spaces. |
||||||
[integer] ISTAT |
0 |
If the call to STR2DBLARY was successful. |
|||||
|
n |
Any nonzero integer returned if the call to STR2DBLARY was unsuccessful. |
|||||
Comments |
|
||||||
Example |
If the input string contains a double, e.g., “1.234”, then the call to STR2DBLARY yields an output ARRAY(1)= 1.234, NSIZE=1, and ISTAT=0 (normal return). If the input string contains “1.234 5.678”, then the call to STR2DBLARY yields an output ARRAY(1)= 1.234, ARRAY(2)= 5.678, NSIZE=2 and ISTAT=0 (normal return). The prototype for STR2DBLARY can be found in the C include header msolvsub_c_include.h in the folder [install-path]\hwsolvers\usersub\c_src\include. |
See Also: