购买与咨询 NX 二次开发视频教程,请联系微信号:13890821008 QQ号:85585969
函数结构:UF_UI_ask_iw_decimal_places( int * mode, int * decimal_places) 函数说明:
查询信息窗口(列表窗口)实数显示偏好和小数点后的位数来显示。UF_UI_SYSTEM_DECIMAL_PLACES意味着用户具有请求被用于格式化实数系统精度对信息窗口。在此情况下,小数的数地方变化的基础上每个真正的价值,这样的总和的地方数目之前和之后的小数点等于浮点精度的双精度显著位数可以在客户机上表示。该decimal_places当设置该模式不应该使用的参数。UF_UI_USER_DECIMAL_PLACES意味着用户已要求具体的小数位数。该decimal_places参数只有这种模式有效。
函数参数:
第1个参数为输出:
输出int * 整数型的参数,参数的变量格式为mode,当前首:UF_UI_SYSTEM DECIMAL_PLACES UF_UI_USER DECIMAL_PLACES
第2个参数为输出:
输出int * 整数型的参数,参数的变量格式为decimal_places,用户定义的小数号码。
UF_UI_ask_iw_decimal_places函数实例代码演示:
此代码获取信息窗口的偏好并打印。
[quote]
#include <uf_ui.h>
#include <uf_defs.h>
void ufusr(char *param, int *retcod, int param_len)
{
int mode, dec_places=0;
UF_initialize();
if ( UF_UI_ask_iw_decimal_places( &mode, &dec_places ) != 0 )
printf( "UF_UI_ask_iw_decimal_places failed\n" );
else if ( mode == UF_UI_SYSTEM_DECIMAL_PLACES )
printf( "UF_UI_SYSTEM_DECIMAL_PLACES\n" );
else if ( mode == UF_UI_USER_DECIMAL_PLACES )
printf( "UF_UI_USER_DECIMAL_PLACES = %d\n", dec_places );
UF_terminate();
}
[/quote]