typeof(3) netbsd man page | unix.com

Man Page: typeof

Operating Environment: netbsd

Section: 3

TYPEOF(3)						   BSD Library Functions Manual 						 TYPEOF(3)

NAME
typeof -- GNU extension for type of an expression
SYNOPSIS
type typeof(expression);
DESCRIPTION
The typeof() construct can be used to obtain the type of an expression. The syntax is comparable to that of sizeof(), but semantically typeof() operates like a type name defined with typedef.
EXAMPLES
The following is a typical example of a type-generic macro: #define MAX(a, b) ({ typeof(a) _a = (a); typeof(b) _b = (b); _a > _b ? _a : _b; })
SEE ALSO
gcc(1), __alignof__(3), attribute(3), offsetof(3)
CAVEATS
The typeof() construct is a non-standard, compiler-specific extension.
BSD
December 19, 2010 BSD
Related Man Pages
offsetof(3) - linux
__builtin_constant_p(3) - netbsd
__alignof__(3) - netbsd
__builtin_return_address(3) - netbsd
je::number(3pm) - debian
Similar Topics in the Unix Linux Community
How to check an input variable
want to use javascript as shell script
Problem with Mail merge in perl
how to delete certain java script from html files using sed
Dynamically enumerating the members of a C++ struct