📄 floatfld.h
字号:
/********************************************************************* 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 + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -