HPGCC3 Documentation 3.0 R003

conversion_data Struct Reference

Data structure used to convert an XREAL number to string. More...

#include <extreal.h>

Data Fields

unsigned int flags
 Flags to control string output:
int width
 Total field width, used for right-justified numbers.
int precision
 Number of decimal digits to display.
int base
 Base to display the number. Supports any base, but tested only with 2, 8, 10, 16.
int type
 Type of number to be displayed.

Detailed Description

Data structure used to convert an XREAL number to string.

This structure contains all information needed for string conversion, including all format modifiers supported by printf

Definition at line 64 of file extreal.h.


Field Documentation

Base to display the number. Supports any base, but tested only with 2, 8, 10, 16.

Definition at line 90 of file extreal.h.

unsigned int conversion_data::flags

Flags to control string output:

bit 0 (1) = Left-align when set, right align when clear. bit 1 (2) = Force sign when set, even for positive numbers bit 2 (4) = 0 padding when set, blank padding when clear bit 3 (8) = Add blank space for sign of positive numbers when set, otherwise sign of positive numbers does not take space. bit 4 (16)= When set, adds prefix '0' or '0x' for octal and hex numbers respectively. bit 5 (32)= Force the display of decimal point when set, even for integer numbers. bit 6 (64)= Display capital letters in hex numbers when set.

Definition at line 78 of file extreal.h.

Number of decimal digits to display.

Definition at line 86 of file extreal.h.

Type of number to be displayed.

1 = signed integer 2 = unsigned integer 4 = floating point in 'e' format (see printf formats) 8 = floating point in 'f' format (see printf formats) 12= floating point in 'g' format (see printf formats)

Definition at line 100 of file extreal.h.

Total field width, used for right-justified numbers.

Definition at line 82 of file extreal.h.


The documentation for this struct was generated from the following file: