Click here to Skip to main content
15,888,610 members
Please Sign up or sign in to vote.
1.00/5 (2 votes)
See more: (untagged)
how to print dollar symbol by using dos
Posted
Comments
Sergey Alexandrovich Kryukov 16-Nov-11 19:19pm    
Language? Application? Any relevant information at all? What's "Commands"?
--SA

Without knowing your problem it is impossible to suggest more than:
echo $
 
Share this answer
 
Comments
Sergey Alexandrovich Kryukov 16-Nov-11 19:23pm    
It works! A 5!
Probably OP's (baseless) concern was encoding or perceiving '$' as as "special character" (a lot of software caused a lot of misconceptions about this strange notion). Please see my solution.
--SA
The dollar character '$' is a part of ASCII code; and all more modern encodings include ASCII as a subset, so it is printed the same way in all systems and all "locales". DOS or not DOS — does not matter.

(However, there were some codes not compatible with ASCII, such as EBCDIC. Hopefully, they are not used anymore, at least not on PCs where DOS can run.)

See:
http://en.wikipedia.org/wiki/ASCII[^],
http://en.wikipedia.org/wiki/EBCDIC[^].

—SA
 
Share this answer
 
v3
Comments
Richard MacCutchan 17-Nov-11 4:34am    
5 for the information, but I still have no idea what OP's problem is.
Sergey Alexandrovich Kryukov 17-Nov-11 11:27am    
I guess the problem was to output dollar sign somewhere, probably imaginary one. :-)
Thank you, Richard.
--SA
Unless you are doing this on Windows 98 or earlier, I'll have to disappoint you. Any windows version after Windows 98 has nothing to do with DOS.

Read here: http://en.wikipedia.org/wiki/Microsoft_Windows#Windows_95.2C_98.2C_and_Me[^]

Cheers!

—MRB
 
Share this answer
 
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900