473,498 Members | 2,021 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

putting commas for large numbers

hi,
i need to show large numbers seperated by commas. since i'm using
variables from speedscript, i cannot know their values, since the user
should enter them. how should i code to show these large numbers in
comma(or pointed)-style?
Jul 20 '05 #1
4 6481
koray wrote:
hi,
i need to show large numbers seperated by commas. since i'm using
variables from speedscript, i cannot know their values, since the user
should enter them. how should i code to show these large numbers in
comma(or pointed)-style?


This coding cannot be done directly with HTML. You need to use
either server side or client side scripting in order to format the
numbers. I recommend server side, unless your willing to accept that
for users with javascript disabled or unsupported, the numbers will
degrade to being unformatted. Either way, this is not the correct
newsgroup to ask in. Please ask in a newsgroup for server side or
client side scripting — whichever is appropriate for your needs and
choice of language.

--
Lachlan Hunt
http://www.lachy.id.au/
la**********@lachy.id.au.update.virus.scanners

Remove .update.virus.scanners to email me,
NO SPAM and NO VIRUSES!!!
Jul 20 '05 #2
Lachlan Hunt wrote:
koray wrote:
hi,
i need to show large numbers seperated by commas. since i'm using
variables from speedscript, i cannot know their values, since the user
should enter them. how should i code to show these large numbers in
comma(or pointed)-style?


This coding cannot be done directly with HTML. You need to use
either server side or client side scripting in order to format the
numbers. I recommend server side, unless your willing to accept that
for users with javascript disabled or unsupported, the numbers will
degrade to being unformatted. Either way, this is not the correct
newsgroup to ask in. Please ask in a newsgroup for server side or
client side scripting — whichever is appropriate for your needs and
choice of language.


Note also that different countries use different seperators:

For 1234567 and 98 thousandths:

1,234,567·098
1,234,567.098
1.234.567,098

The first is used in the UK (but usually we're lazy and use . instead of
·) and probably lots of other places, the second in the US and elsewhere,
the third in much of Europe (and probably elsewhere too). To avoid
confusion, you might be better off using no-break spaces:

1 234 567.098
1 234 567,098
1 234 567·098

--
Matt
-----= Posted via Newsfeeds.Com, Uncensored Usenet News =-----
http://www.newsfeeds.com - The #1 Newsgroup Service in the World!
-----== Over 100,000 Newsgroups - 19 Different Servers! =-----
Jul 20 '05 #3
JRS: In article <61**************************@posting.google.com >, seen
in news:comp.infosystems.www.authoring.html, koray
<kk*********@yahoo.com> posted at Sun, 4 Jul 2004 22:50:09 :
i need to show large numbers seperated by commas. since i'm using
variables from speedscript, i cannot know their values, since the user
should enter them. how should i code to show these large numbers in
comma(or pointed)-style?


Your shift key is disused, broken or missing; please remedy that.

What's speedscript?

See <URL:http://www.merlyn.demon.co.uk/js-maths.htm#Out>.

Are there any places that use a more-or-less European script (including
Cyrillic) that normally use something other than dot or comma for the
decimal separator, and something other than dot, comma, [thin] space, or
none for the thousands separator?

--
© John Stockton, Surrey, UK. ?@merlyn.demon.co.uk Turnpike v4.00 IE 4 ©
<URL:http://jibbering.com/faq/> JL / RC : FAQ for news:comp.lang.javascript
<URL:http://www.merlyn.demon.co.uk/js-index.htm> jscr maths, dates, sources.
<URL:http://www.merlyn.demon.co.uk/> TP/BP/Delphi/jscr/&c, FAQ items, links.
Jul 20 '05 #4
koray wrote:
i need to show large numbers seperated by commas. since i'm using
variables from speedscript, i cannot know their values, since the user
should enter them. how should i code to show these large numbers in
comma(or pointed)-style?


I use PHP on the server-side for this task. The function is called
"number_format".

--
Google Blogoscoped
http://blog.outer-court.com
Jul 20 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
44724
by: David Sharp | last post by:
Once I've converted my floats to chars using STR, is there an easy way to put commas in separating the thousands. i.e. convert 53000000.12 to 53,000,000.12 I'm thinking I'll have to do it...
7
8289
by: AES | last post by:
Encountered a URL containing a comma the other day -- the first time I've ever noticed that, so far as I can recall. It worked fine, however, and I gather commas are legal in URLs. Out of...
10
4965
by: Tuvas | last post by:
I've been thinking about writing a program to generate the world's largest prime numbers, just for the fun of it. This would require being able to hold an 8000000 digit number into memory (25...
7
1401
by: svm | last post by:
Hi! I'm in the process of creating an invoice-generating program in C#... I've already written the code to produce the page using a PrintDocument, but graphics.DrawString only accepts truetype...
3
7620
by: Robert Scheer | last post by:
Hi. I have a regularexpression validator control on a page. This regular expression validates a textbox to accept only numbers and commas: validationexpression="*" I am trying to modify this...
14
7048
by: Adrienne Boswell | last post by:
Although this is a client side issue, I am also posting to asp.general in case there is someway to do this only server side (which I would prefer). Here's my form: <form method="post"...
2
2090
by: freemld10 | last post by:
Hi guys, Can someone please help me to Format Numbers with commas. The script below have very large number without commas. To read numbers in trillions and billions are hard, without commas to...
11
1898
by: James Kanze | last post by:
On Apr 11, 6:48 am, Jerry Coffin <jerry.cof...@gmail.comwrote: The combination of the two. *IF* it is appropriate to use a container here, that container
0
6993
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7162
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
7197
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
5456
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
4584
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3088
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
1411
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
650
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
287
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.