Logo Search packages:      
Sourcecode: qfits version File versions  Download package

char* qfits_table_field_to_string ( const qfits_table table,
int  col_id,
int  row_id,
int  use_zero_scale 
)

given a col and a row, find out the string to write for display

Parameters:
table table structure
col_id col id (0 -> nbcol-1)
row_id row id (0 -> nrow-1)
use_zero_scale Flag to use or not zero and scale
Returns:
the string
This function is highly inefficient, it should not be used in loops to display a complete table. It is more to get one field from time to time, or for debugging puposes. The returned object must be deallocated with qfits_free().

Definition at line 1609 of file qfits_table.c.

References tab_t.

{
    char    *    str ;
    
    switch (table->tab_t) {
        case QFITS_BINTABLE:
            str = qfits_bintable_field_to_string(table, col_id, row_id, 
                    use_zero_scale) ;
            break ;

        case QFITS_ASCIITABLE:
            str = qfits_asciitable_field_to_string(table, col_id, row_id, 
                    use_zero_scale) ;
            break ;
        default:
            qfits_error("Table type not recognized") ;
            return NULL ;
            break ;
    }
    return str ;
}


Generated by  Doxygen 1.6.0   Back to index