Function Format (const format: string; const args: arch: String; $ [sysutils.pas feature Returns the character form of formatting a array constant in the specified mode Description This function is the most used function in Delphi, Now list a few examples to give you an intuitive understanding "%" [index ":"] ["-"】 "" summary] type Format ('x =% d', [12]); // 'x = 12' // Most normal format ('x =% 3D', [12]); // 'x = 12' // Specify the width Format ('x =% f', [12.0]); // '= 12.00' // floating point FORMAT ('x =%. 3f', [12.0]); // '= 12.000' // Specify decimal format ('x =% 8.2f' [12.0]) // 'x = 12.00'; Format ('x =%. * F', [5, 12.0]); // '= 12.00000' // Dynamically configure format ('x =%. 5d', [12] ); // 'x = 00012' // front supplement 0Format ('x =%. 5x', [12]); // 'x = 0000c' // hex Format ('x =% 1: D % 0: D ', [12, 13]); //' x = 1312 '// Use Index Format (' x =% P ', [NIL]); //' x = 00000000 '// Pointer Format ( 'x =% 1.1e', [12.0]); // '==1.2e 001' // Scientific count method format Format ('x = %%', []); // 'x =%' / / Get "%" s: = format ('% s% d', [s, i]); // s: = s strt (i); // connection string ========== =