Re: syntax question, not in online refernce
This WebDNA talk-list message is from 1997
It keeps the original formatting.
numero = 10507
interpreted = N
texte = >Trying to format a number 1579 no floating point.>[format thousands 7?][countertotal][/format], where ? is what goes here!>want it to display 1,579It's in the html reference for b13 ...[Format FormatSpec]Text or Number[/Format] Formats text or numbers in various widths or currency formats.To display numbers with various decimal points or currency formats,surround the number or text with a [Format] context.Example (normally you would put the following text into a .TMPL file onyour server and use a web browser to link to it): [Format 10.2f]99.5[/Format] (f stands for floating-point number) [Format 10s]Hello[/Format] (s stands for string of text) [Format date %m/%d/%y]394363210[/Format] [Format thousands 14.2f]394363210[/Format] [Format thousands 14,2f]394363210[/Format] Try It!The number is displayed right-justified with enough preceding spaces anddigits after the decimal point to fill the exact width ofthe format specifier. Text is left-justified, with enough spaces after itto exactly fill the width specifier.| 99.50| (10 wide, 2 after the decimal)|Hello | (10 wide, text)|03/04/97| (#seconds as a date)|394,363,201.00| (14 wide, number with thousands separator)|394.363.201,00| (14 wide, number with European thousands separator)Given a number 345.67, the following format specifiers will display as shown: 8.3f = | 345.670| (f stands for floating point) 8.2f = | 345.67| 8.1f = | 345.7| (notice rounding from .67 to .7) 8d = | 345| (d stands for decimal integer) .8d = |00000345|Optional date format -- to format a number as a date (the number mustrepresent the number of seconds since Midnight, January1st, 1900), use the optional date specifier and a date format, the same asfrom the [date] tag.Sincerely,Ken------------------------------------To leave this talk list send an email to macjordomo@smithmicro.comwith BODYunsubscribe WebDNA-Talk------------------------------------
Associated Messages, from the most recent to the oldest:
>Trying to format a number 1579 no floating point.>[format thousands 7?][countertotal][/format], where ? is what goes here!>want it to display 1,579It's in the html reference for b13 ...[Format FormatSpec]Text or Number[/Format] Formats text or numbers in various widths or currency formats.To display numbers with various decimal points or currency formats,surround the number or text with a
[format] context.Example (normally you would put the following text into a .TMPL file onyour server and use a web browser to link to it): [Format 10.2f]99.5[/Format] (f stands for floating-point number) [Format 10s]Hello[/Format] (s stands for string of text) [Format date %m/%d/%y]394363210[/Format] [Format thousands 14.2f]394363210[/Format] [Format thousands 14,2f]394363210[/Format] Try It!The number is displayed right-justified with enough preceding spaces anddigits after the decimal point to fill the exact width ofthe format specifier. Text is left-justified, with enough spaces after itto exactly fill the width specifier.| 99.50| (10 wide, 2 after the decimal)|Hello | (10 wide, text)|03/04/97| (#seconds as a date)|394,363,201.00| (14 wide, number with thousands separator)|394.363.201,00| (14 wide, number with European thousands separator)Given a number 345.67, the following format specifiers will display as shown: 8.3f = | 345.670| (f stands for floating point) 8.2f = | 345.67| 8.1f = | 345.7| (notice rounding from .67 to .7) 8d = | 345| (d stands for decimal integer) .8d = |00000345|Optional date format -- to format a number as a date (the number mustrepresent the number of seconds since Midnight, January1st, 1900), use the optional date specifier and a date format, the same asfrom the
[date] tag.Sincerely,Ken------------------------------------To leave this
Talk List send an email to macjordomo@smithmicro.comwith BODYunsubscribe WebDNA-Talk------------------------------------
Kenneth Grome
DOWNLOAD WEBDNA NOW!
Top Articles:
Talk List
The WebDNA community talk-list is the best place to get some help: several hundred extremely proficient programmers with an excellent knowledge of WebDNA and an excellent spirit will deliver all the tips and tricks you can imagine...
Related Readings:
Can GMT be called from the OS ? (2004)
include bug????? (1997)
Web*SSL and WebCatalog (1997)
Email template names (1997)
Test (2002)
WebCat2b15MacPlugIn - [authenticate] not [protect] (1997)
WebCatalog2 Feature Feedback (1996)
ShipTotal Again (1998)
Nav. 4 probs with cart - Serious problem (1997)
[SearchString] (1998)
EditPlus 2 WebDNA cliptext (2002)
Fedora Core 2 (2005)
Thanks Grant (1997)
BGcolor (1997)
A multi-processor savvy WebCatalog? (1997)
Writing custom WebCat searches?? (2000)
calculating ShipCost depending on weight (1997)
Emailer problems solved (1997)
Beta 3.0.3 fix for serial# problem (Mac) (1998)
WebCat2: multiple currency support (1997)