HydroCODE_2D 0.1
This is a implementation of fully explict forward Euler scheme for 2-D Euler equations of motion on Eulerian coordinate
str_num_common.c 文件参考

This is a set of common functions for string and number processing. 更多...

#include <math.h>
#include <string.h>
#include <stdio.h>
str_num_common.c 的引用(Include)关系图:

浏览源代码.

函数

int format_string (char *str)
 This function examine whether a string represents a real number. 更多...
 
double str2num (char *number)
 This function transform a string consisting '1', '2', ..., and '.' into the real number that it represents. 更多...
 

详细描述

This is a set of common functions for string and number processing.

在文件 str_num_common.c 中定义.

函数说明

◆ format_string()

int format_string ( char *  str)

This function examine whether a string represents a real number.

Transform the string represents a negtive number into a string represents a positive one and return its' sign. It returns 0 if the string do not represents a real number. After calling this function, there will be only one 'e' in the string, and the only position for '-' is behind 'e', and there can be only one dot in the string and the only position for it in before 'e'.

参数
[in]strString to be examined.
返回
The sign of the number represented by the string.
返回值
1Positive number.
-1Negative number.
0Not a number.
弃用:
This function has been replaced by the variable 'errno' in the standard Library <errno.h>.

在文件 str_num_common.c28 行定义.

◆ str2num()

double str2num ( char *  number)

This function transform a string consisting '1', '2', ..., and '.' into the real number that it represents.

参数
[in]numberString of the real number.
返回
result: The real number that the string represents.
弃用:
This function has been replaced by the 'strtod()' function in the standard Library <stdio.h>.

在文件 str_num_common.c126 行定义.

函数调用图:
这是这个函数的调用关系图: