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 on your 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 and digits after the decimal point to fill the exact width of the format specifier. Text is left-justified, with enough spaces after it to 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 must represent the number of seconds since Midnight, January 1st, 1900), use the optional date specifier and a date format, the same as from the [date] tag. Sincerely, Ken ------------------------------------ To leave this talk list send an email to macjordomo@smithmicro.com with BODY unsubscribe WebDNA-Talk ------------------------------------ Associated Messages, from the most recent to the oldest:

    
  1. Re: syntax question, not in online refernce (grichter@panavise.com (Gary Richter) 1997)
  2. Re: syntax question, not in online refernce (Kenneth Grome 1997)
  3. Re: syntax question, not in online refernce (Grant Hulbert 1997)
  4. Re: syntax question, not in online refernce (grichter@panavise.com (Gary Richter) 1997)
  5. Re: syntax question, not in online refernce (Kenneth Grome 1997)
  6. syntax question, not in online refernce (grichter@panavise.com (Gary Richter) 1997)
>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 on your 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 and digits after the decimal point to fill the exact width of the format specifier. Text is left-justified, with enough spaces after it to 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 must represent the number of seconds since Midnight, January 1st, 1900), use the optional date specifier and a date format, the same as from the [date] tag. Sincerely, Ken ------------------------------------ To leave this Talk List send an email to macjordomo@smithmicro.com with BODY unsubscribe 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:

Generating unique SKU from [cart] - Still Stumped... (1997) Uploading very large image files (2003) calculate age (2003) New Command prefs ... (1997) WebTen Memory Error with Plug-In (1998) Country & Ship-to address & other fields ? (1997) Make sure I understand this??? (1997) 2.0 Info (1997) flushdatabases (1997) New public beta available (1997) Error Lob.db records error message not name (1997) [WebDNA] [TEST] (2009) Any help gratefully appreciated (2001) Error Lob.db records error message not name (1997) Adding discount to cart (2000) and more [shipcost].... (2001) dos performance (1998) Is there a max number of fields? (1998) Erotic Sites (1997) JavaScript form question (2001)