Upravit

Sdílet prostřednictvím


int attribute

The keyword int specifies a 32-bit signed integer on 32-bit platforms. On 16-bit platforms, the keyword int is an optional keyword that can accompany the keywords small, short, and long.

[ signed | unsigned ] integer-modifier [ int ] declarator-list;

Parameters

integer-modifier

Specifies the keyword small, short, long, hyper, __int3264, or __int64,which selects the size of the integer data. On 16-bit platforms, the size qualifier must be present.

declarator-list

Specifies one or more standard C declarators, such as identifiers, pointer declarators, and array declarators. (Function declarators and bit-field declarations are not allowed in structures that are transmitted in remote procedure calls. These declarators are allowed in structures that are not transmitted.) Separate multiple declarators with commas.

Remarks

Integer types are among the base types of the interface definition language (IDL). They can appear as type specifiers in typedef declarations, general declarations, and function declarators (as a function-return-type specifier and as a parameter-type specifier). For the context in which type specifiers appear, see Interface Definition (IDL) File.

If no integer sign specification is provided, the integer type defaults to signed.

DCE IDL compilers do not allow the keyword signed to specify the sign of integer types. Therefore, this feature is not available when you use the MIDL compiler /osf switch.

Microsoft does not recommend the use of __int3264 for remoting if it can be avoided. Please see the topic on __int3264 for more information regarding it's use and limitations.

Examples

signed short int i = 0; 
int j = i; 
typedef struct 
{ 
    small int         i1; 
    short             i2; 
    unsigned long int i3; 
} INTSIZETYPE; 
 
HRESULT MyFunc([in] long int lCount);

See also

MIDL Base Types

enum

hyper

Interface Definition (IDL) File

long

/osf

short

signed

small

struct

typedef

union