strFormatNumber

C Styled Script
Reference Manual

<< Back  End  Next >>
 
 
INDEX
Introduction
Installation
Using The CSS Executive
Language
Directives
System Library
String Library
   strAscii
   strBuildRecord
   strCenter
   strChange
   strChar
   strExport
   strFormatNumber
   strImport
   strIndexOf
   strIsInteger
   strIsNumber
   strLeftJustify
   strLength
   strLower
   strParseRecord
   strRemoveWords
   strRightJustify
   strSplitConnectString
   strSplitPath
   strSpread
   strStrip
   strStripExtension
   strStripLeading
   strStripTrailing
   strSubString
   strUpper
   strWordCount
   strWords
Regular Expression Lib.
File Library
Database Library
C API
C++ API
CSS Links
  
strFormatNumber(
  const val,      // value to format
  const width,    // width of field
  [const frac])   // # of fractional digits (default = 0)

Formats a number for output. The result is a string of width characters with the value right adjusted. If the value does not fit into width, the result will be as long as the value requires at least.

Examples:

strFormatNumber(1.5, 10, 2);      // '      1.50'
strFormatNumber(123.456, 10, 2);  // '    123.45'
strFormatNumber(123.456, 10);     // '       123'
 Copyright © IBK LandquartLast revised by Peter Koch, 24.02.00<< Back  Top  Next >>