What does the underscore mean in: _("Undo")

Please support our C++ advertiser: Intel Parallel Studio Home
Reply

Join Date: Dec 2008
Posts: 27
Reputation: edgar5 is an unknown quantity at this point 
Solved Threads: 2
edgar5 edgar5 is offline Offline
Light Poster

What does the underscore mean in: _("Undo")

 
0
  #1
Sep 23rd, 2009
Okay, it's been a long time since I've programmed in C++! Languages change considerably in the last 5 years or so. In reviewing some source code I often see statements like this:
  1. wxString label;
  2. if (name == wxT("Undo")) {
  3. label = _("Undo");
obviously, I snipped out a lot of code.

My question is, what does the underscore mean in:
  1. _("Undo")
-Ed
MS Vista Ultimate 64-bit; Visual Studio 2008 & 2010 beta; Visual Basic; Visual C++

Asus P5E3 Deluxe w/ Intel E6850, 8 GB OCZ DDR3 PC3-12800, SAPPHIRE HD3870 GPU
Reply With Quote Quick reply to this message  
Join Date: Apr 2005
Posts: 1,404
Reputation: ShawnCplus is a glorious beacon of light ShawnCplus is a glorious beacon of light ShawnCplus is a glorious beacon of light ShawnCplus is a glorious beacon of light ShawnCplus is a glorious beacon of light 
Solved Threads: 225
Sponsor
ShawnCplus's Avatar
ShawnCplus ShawnCplus is offline Offline
Code Monkey

Re: What does the underscore mean in: _("Undo")

 
1
  #2
Sep 23rd, 2009
_ is usually associated with gettext with deals with text localization.
GCS d- s+ a-->? C++(++++) UL+++ P+>+++ L+++ E--- W+++
N+ o K w++(---) O? !M- V PS+>++ PE+ Y+ PGP !t- 5? X- R tv+
b+>++ DI+ D G++>+++ e+ h+>++ r y+
PMs asking for help will not be answered, post on the forums. That's what they're there for.
Reply With Quote Quick reply to this message  
Join Date: Dec 2008
Posts: 27
Reputation: edgar5 is an unknown quantity at this point 
Solved Threads: 2
edgar5 edgar5 is offline Offline
Light Poster

Re: What does the underscore mean in: _("Undo")

 
0
  #3
Sep 23rd, 2009
OK, that might be enough for me to actually figure out what it is being used for here. I thought it might be some new C++ convention.

Thanks!
Last edited by edgar5; Sep 23rd, 2009 at 4:52 pm.
-Ed
MS Vista Ultimate 64-bit; Visual Studio 2008 & 2010 beta; Visual Basic; Visual C++

Asus P5E3 Deluxe w/ Intel E6850, 8 GB OCZ DDR3 PC3-12800, SAPPHIRE HD3870 GPU
Reply With Quote Quick reply to this message  
Reply

Message:


Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC