|
An Information Portal to Biological Macromolecular Structures |
||
|
PDB Home |
Contact Us |
Software Tools Home | Dictionary Home | PDBML Home | |
#include "ISTable.h"
int ISTable::SetPrecision(unsigned int newP, int colIndex);
#include "ISTable.h"
ISTable * pTable = new ISTable();
... // do table construction
// Set all columns to doubles with 3 decimals precision
for (int i = 0; i < pTable->GetNumColumns(); i++) {
pTable->SetFlags(ISTable::DT_DOUBLE, i);
pTable->SetPrecision(3, i);
}
SetPrecision sets the number of significant decimal places for the data in a column. This precision only has meaning for columns with a datatype of DT_DOUBLE.
| newP | The new precision, in decimal places. |
| colIndex | The index of the column to have precision set. |
A negative value indicates an error or warning.
| See also: | Column Option Constants |
|---|