constants.idl

来自「这是广泛使用的通信开源项目,对于大容量,高并发的通讯要求完全能够胜任,他广泛可用」· IDL 代码 · 共 92 行

IDL
92
字号
// constants.idl,v 1.7 2002/08/08 18:42:27 parsons Exp

// ============================================================================
//
// = LIBRARY
//    TAO/tests/IDL_Test
//
// = FILENAME
//    constants.idl
//
// = DESCRIPTION
//    This file contains examples of IDL code that has 
//    caused problems in the past for the TAO IDL
//    compiler. This test is to make sure the problems
//    stay fixed.
//
// = AUTHORS
//    Jeff Parsons <parsons@cs.wustl.edu> and TAO users.
//
// ============================================================================


const string all_escape = "\n\t\v\b\r\f\a\\\?\'\"";

const char tick = '\'';

const char backslash = '\\';

// The escape sequences will display differently
// depending on whether the platform uses signed
// or unsigned chars, but either should build w/o
// errors.

// octal escape sequences

const char oct_nought = '\000';
const char lucky = '\7';
const char square = '4';
const char blastoff = '\321';
const char max_char_oct = '\377';

// hex escape sequences

const char hex_nought ='\x0';
const char fingers = '\xA';
const char fortnight = '\xe';
const char fivebits = '\x32';
const char maybe_minus = '\xAf';
const char max_char_hex = '\xff';

// unsigned longs greater than LONG_MAX

const unsigned long in_range = 3222111000;
const unsigned long max_ulong_oct = 037777777777;
const unsigned long max_ulong_hex = 0XFFFFFFFF;

// various uncommon but legal formats for floats and doubles

const float root_beer = .2;
const double bogey = .2;
const float trip = 2.;
const double vision = .2e-4;
const double take = 2e3;
const double dip = 1.797693134862315E+308;
const double trouble = 2.2250738585072014E-308;

// The original Sun code for bitwise operators was broken.

const unsigned short stuff = ~0;
const unsigned long day = ~0;
const unsigned long drink = 1000000000 << 2;

// An enum of one type cannot be assigned to an constant of another
// enum type, but it's ok if one is a typedef of the other.
module m_a {
   enum enum_a { value_1, value_2, value_3, value_4, value_5 };
};

module m_b {
   typedef m_a::enum_a enum_b;
};

module problems {

   const m_b::enum_b bconst = m_a::value_2;
};





⌨️ 快捷键说明

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