HydroCODE 0.1
This is a implementation of fully explict forward Euler scheme for 1-D Euler equations of motion on Lagrange 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>
#include <stdlib.h>
str_num_common.c 的引用(Include)关系图:

函数

static int format_string (char *str)
 This function examine whether a string represents a real number. 更多...
 
static 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.

函数说明

◆ format_string()

static int format_string ( char *  str)
static

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>.

◆ str2num()

static double str2num ( char *  number)
static

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

参数
[in]numberString of the real number.
返回
The real number that the string represents.
弃用:
This function has been replaced by the 'strtod()' function in the standard Library <stdio.h>.
函数调用图:
这是这个函数的调用关系图: