RCSB PDB Protein Data Bank A Member of the wwPDB
An Information Portal to Biological Macromolecular Structures
PDB Home | Contact Us
next up previous contents
Next: Rename Up: General Methods Previous: GetDataType

SetPrecision

NAME SetPrecision

PROTOTYPE

#include "ISTable.h"

int ISTable::SetPrecision(unsigned int newP, int colIndex);

EXAMPLE

#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);
}
PURPOSE

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.

RECEIVES

newP The new precision, in decimal places.
colIndex The index of the column to have precision set.

RETURN VALUE

A negative value indicates an error or warning.

REMARKS

See also: Column Option Constants



Olivera Tosic
6/12/2002

 

© RCSB PDB