get_atom_type.cc

来自「c++编写的并行拉马克遗传算法的程序。实现分析对接程序」· CC 代码 · 共 43 行

CC
43 行
字号
/* get_atom_type.cc */#ifdef sgi    #include <stdio.h>    #include "get_atom_type.h"#else    extern "C"    {	#include <stdio.h>        #include "get_atom_type.h"    }#endifextern char *programname;extern FILE *logFile;int get_atom_type( char aname[4], 		   char chtype[ATOM_MAPS] ){    char ch, ch1;    register int i;     int type = -1;    ch1 = aname[0];    ch = (ch1 == ' ') ? aname[1] : ch1;    for ( i=0; i<ATOM_MAPS; i++) {        if (ch == chtype[i]) {            type = i;        }    }        if (type == -1) {        fprintf(stderr, "%s: Atom type error, can't find type for \"%s\" in typelist \"%s\".\n", programname, aname, chtype );    }    return (type);} /* EOF */

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?