floatfld.h

来自「CD_高级PALM编程」· C头文件 代码 · 共 48 行

H
48
字号
/********************************************************************* FILE:				FloatFld.h** DESCRIPTION:	The header file for the Field Fun project module.*					It contains contants and data type definitions.** VERSION:		1.0**********************************************************************/#include "FloatFldRsc.h"//	Internal Constants#define	APP_FILE_CREATOR			'PAKA'	// Palm Algorithms for Killer Applications#define	MIN_ROM_MAJOR				3#define	MIN_ROM_MINOR				1#define	MIN_ROM_VERSION			sysMakeROMVersion ( MIN_ROM_MAJOR, MIN_ROM_MINOR, 0, sysROMStageDevelopment, 0 )// Max # digits on either side of the decimal point of a number.// Bounded by # of precise digits that can accurately be converted from long long to double// and successfully stored in a double.#define	MAX_LHS_DIGITS				17#define	MAX_RHS_DIGITS				17#define	VERY_SMALL_NUM			1.0e-15// Max # digits in full floating point # string. MAX_DIGITS on each side of decimal point,// + thousands separators each 3 chars on left, plus decimal + sign + terminator char.// Because of floating point imprecisions, only about 15-16 digits TOTAL can be represented. #define	MAX_NSTR_LEN				MAX_LHS_DIGITS + MAX_RHS_DIGITS + (( MAX_LHS_DIGITS / 3 ) + 1 ) + 3  Char		gNumStr [ MAX_NSTR_LEN ];	// Largest # chars in converted number string// Localization globalsChar		gKSep, gDSep;				// 1000ths and decimal characters// Internal function prototypes for non-Starter functions// Check their definitions in the source code for parameter definitions static void  		SetPopup ( UInt16 popID, UInt16 listID, Int16 val );static void		HandlePopup ( UInt16 popID );static void 		MoveToNextField ( FormPtr frmP, UInt8 key );static double		StringToDouble ( Char * strP );static void 		DoubleToString ( double val, Char * dstP, Boolean localize,UInt8 precision,  UInt8 maxLen );static Boolean 	CheckValidNumChar ( FieldPtr fldP, UInt8 key, UInt8 precision );static void 		DisplayNumber ( void );

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?