c - 数字函数的C命名约定?

标签 c naming-conventions

说我有这个功能:

int epic(int);

我知道这些命名约定,对吗?是否存在其他非常常见的?
              long epicl   (long);
         long long epicll  (long long);
      unsigned int epicu   (unsigned int);
     unsigned long epicul  (unsigned long);
unsigned long long epicull (unsigned long long);
            double fepic   (double);
             float fepicf  (float);

最佳答案

有时,如果返回类型与参数类型不同,则可以使用前缀来表明这一点。例如,考虑以下内容(来自C99):


double round(double x);
float roundf(float x);
long double roundl(long double x);

long int lround(double x);
long int lroundf(float x);
long int lroundl(long double x);

long long int llround(double x);
long long int llroundf(float x);
long long int llroundl(long double x);

关于c - 数字函数的C命名约定?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/9803368/

相关文章:

c - 从文件数据中读取 short 的值

c - a[ ][3] 此数组中已创建了多少行?

function - 说出该函数的名称! (因为我不能)

c - 堆栈是向上还是向下增长?

c - 如何正确计算结构的大小?

asp.net - 子对象的 MVC 模型绑定(bind)命名约定?

naming-conventions - 需要帮助命名代表一个值及其线性变化的类

android - Android应用程序的命名约定?

naming-conventions - 选择好的标识符名称

c - 指向结构的指针数组