Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- Watcom Debugger Guide - <u>sizeof unary_expression</u> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
sizeof unary_expression

    Example:

         sizeof tyme
         sizeof (*tyme)

sizeof(type_name)

    Example:

         sizeof( struct tm )

(type_name) unary_expression
    The type conversion operator (type_name) is used to convert an item from
    one type to another.  The following describes the syntax of "type_name".

          
         type_name ::= type_spec { [ "near" | "far" | "huge" ] "*" }
         type_spec ::= typedef_name
                         |   "struct" structure_tag
                         |   "union"  union_tag
                         |   "enum"   enum_tag
                         |   scalar_type { scalar_type }
         scalar_type ::= "char" | "int" | "float" | "double"
                         |   "short" | "long" | "signed" | "unsigned"

    Example:

         (float) 4
         (int) 3.1415926

[type_name] unary_expression
    You can force the debugger to treat a memory reference as a particular
    type of value by using a type coercion operator.  A type specification
    is placed inside brackets as shown above.  The basic types are char
    (character, 8 bits), short (short integer, 16 bits), long (long integer,
    32 bits), float (single-precision floating-point, 32 bits), and double
    (double-precision floating-point, 64 bits).  Unless qualified by the
    short or long keyword, the int type will be 16 bits in 16-bit
    applications and 32 bits in 32-bit applications (386, 486 and Pentium
    systems).  The character, short integer and long integer types may be
    treated as signed or unsigned items.  The default for the character type
    is unsigned.  The default for the integer types is signed.

    Example:

         [char]                  (default unsigned)
         [signed char]
         [unsigned char]
         [int]                   (default is signed)
         [short]                 (default is signed)
         [short int]             (default is signed)
         [signed short int]
         [long]                  (default is signed)
         [long int]              (default is signed)
         [signed long]
         [unsigned long int]
         [float]
         [double]

    Note that it is unnecessary to specify the int keyword when short or
    long are specified.

?
    Existence test:  The "?" unary operator may be used to test for the
    existence of a symbol.

    Example:

         ?id

    The result of this expression is 1 if "id" is a symbol known to the
    debugger and 0 otherwise.  If the symbol does not exist in the current
    scope then it must be qualified with its module name.  Automatic symbols
    exist only in the current function.

Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson