SilverScreen Solid Modeler

pm_formatted

pm_formatted

Previous topic Next topic  

pm_formatted

Previous topic Next topic JavaScript is required for the print function  

SilverScreenAPI

 

void pm_formatted ( char *message, double *value,

                   int mandatory, int units, int notation )

 

char   *message;        // prompt string

double *value;          // address of double to receive result

int     mandatory;      // mandatory entry flag

int     units;          // unit of measurement selector

int     notation;       // notation selector

 

 




Synopsis

#include "silver.h"

 

The pm_formatted function adds a formatted double prompt to the current panel, with prompt specified by message . The value will be displayed on the panel according to units and notation . (see format_double) If mandatory is 1, a value must be entered for the item. If mandatory is 0, then the initial value can be accepted without change. After pm_execute , the resulting value is returned in value .

 

 

Parameters

message is a null-terminated string containing the prompt message. value is the address of a double that is to receive the result of the prompt. mandatory is an integer specifying whether entry for this field is mandatory or not. notation is one of the following values (defined in silver.h):

 

Name

Value

SCIENCE

1

DECIMAL

2

ENGINEER

3

ARCHITECT

4

FRACTIONAL

5

 

units may be one of the following (defined in silver.h)

 

Name

Value

FEET

1

INCHES

2

METERS

3

CENTIMETERS

4

MILLIMETERS

5

GENERIC

6

 

 

Return Value

none.

 

 

See Also

pm_execute

 

 

Example

C / C++ Code

 

 double width = 36.0;

 pm_formatted ( "Width of door", &width, ARCHITECT, INCHES, 0 );