Articoli Referenze Script FAQ Downloads ASP E-Commerce con ASP Menu Javascript Area Aziende Cocktail Registrazione domini



Formattare un numero separando le cifre decimali

Home + Articoli + Numeri + Articolo # 25
Autore: Luca Ruggiero



La funzione predefinita FormatNumber del VBScript consente di formattare automaticamente un numero separando le cifre decimali; ad esempio possiamo ricevere in output 1.000 piuttosto che 1000, eseguendo la trasformazione al volo e lasciando inalterato il valore numerico reale 1000.

Facciamo un esempio
<%
    Response.Write 1000
%>
restituisce 1000, mentre
<%
    Response.Write FormatNumber(1000, 0)
%>
restituisce 1.000.

© 2008 ASP Center di Luca Ruggiero - P. IVA 05564851219 - Disclaimer | Privacy | Pubblicità | Supportaci | Staff | Contatti
  Appunti PHP | Giornale Webmaster | Mr.Webmaster | Download | DevSpy.com | ASPCode.it | ClaudioGarau.it | Webmaster Facile | Come Faccio | CodiceFacile.it | I Programmatori | By Luciani | VoiceXML Italian User Group | Giochi | Extro Web Site | Morpheus Web | AG Web Solutions | Net-Free | PC Sicuro | PC Self | Tutorial Web | Dablones