心无尘土
一段平凡的日子,一段流逝的岁月
1.
    if ((n > 32,767) or (n < -32,767)) { n.selectUseType = long; }
2.
    if (there are large arrays or many structures) { n.selectUseType = short; }
3.
    if ((well-defined overflow characteristics are important ) or
        (not negative values) or
        (manipulating bits or bytes and not want to meet sign-extension problems))
    {
        n.selectUseType = unsigned n.selectUseType;
    }
4.
    assert(not use unsigned char replace integer type);
5.   
    assert(sizeof(char) <= sizeof(short) <= sizeof(int) <= sizeof(long) <= sizeof(long long));
6.
    if (Under ANSI C)
    {
       nTypeMin = <limits.h>.maximum;
       nTypeMax = <limits.h>.minimum;
    }
7.
    if (want to define an exact size object)
    {
        n.selectUseType = typedef userDefineType;   
    }
posted on 2006-07-27 14:47 Yama的家 阅读(239) 评论(0)  编辑 收藏 引用 所属分类: 标准C
只有注册用户登录后才能发表评论。

<2006年7月>
2526272829301
2345678
9101112131415
16171819202122
23242526272829
303112345

常用链接

留言簿(5)

随笔分类(66)

相册

积分与排名

  • 积分 - 41757
  • 排名 - 137

最新评论

阅读排行榜