.- help for ^fns^ Version 1/10/96 .- Formats a (string containing a) numeric value --------------------------------------------- ^fns^ new old [^, w^idth^(^int 5^) d^ec^(^int 0^)^ | ^da^te^(^string^)^] Stores a numeric value as a formatted sting in a macro. Programming utility used in programs like ^sumby^ and ^class^. ^Note^ ^----^ Deviation from the usual Stata syntax: ^new^ and ^old^ are ^NOT^ variable names. ^new^ is the name of a global macro, in which the formatted value will be stored as a string. ^old^ is either a number, a scalar, an expression or the name of global macro that contains a number without blanks. Options ------- ^width()^ specifies the width of the formatted value stored in ^new^. Default 5. ^dec()^ specifies the number of decimals. Default 0. ^date()^ must specify a date format, e.g. ^%d^. If ^date()^ is specified the value in ^old^ is interpreted as an elapsed date and will be stored as a formatted date in ^new^. If ^date()^ is specified ^width^ and ^dec^ are ignored. ^Author:^ ^-------^ Wim van Putten e-mail: w.vanputten@@erasmusmc.nl