亚洲av成人无遮挡网站在线观看,少妇性bbb搡bbb爽爽爽,亚洲av日韩精品久久久久久,兔费看少妇性l交大片免费,无码少妇一区二区三区

  免費注冊 查看新帖 |

Chinaunix

  平臺 論壇 博客 文庫
最近訪問板塊 發(fā)新帖
查看: 2421 | 回復(fù): 8
打印 上一主題 下一主題

問個土問題,Return _("XXX");的下劃線做何用途 [復(fù)制鏈接]

論壇徽章:
0
跳轉(zhuǎn)到指定樓層
1 [收藏(0)] [報告]
發(fā)表于 2009-05-11 14:55 |只看該作者 |倒序瀏覽
return _("it is based on your username";

這里的下劃線是做什么用的呢?

謝謝.

論壇徽章:
3
金牛座
日期:2014-06-14 22:04:062015年辭舊歲徽章
日期:2015-03-03 16:54:152015年迎新春徽章
日期:2015-03-04 09:49:45
2 [報告]
發(fā)表于 2009-05-11 15:02 |只看該作者

回復(fù) #1 MaxWu 的帖子

這個是win下面的吧

論壇徽章:
0
3 [報告]
發(fā)表于 2009-05-11 15:13 |只看該作者
是不是表示寬字符。。。忘了

論壇徽章:
95
程序設(shè)計版塊每日發(fā)帖之星
日期:2015-09-05 06:20:00程序設(shè)計版塊每日發(fā)帖之星
日期:2015-09-17 06:20:00程序設(shè)計版塊每日發(fā)帖之星
日期:2015-09-18 06:20:002015亞冠之阿爾艾因
日期:2015-09-18 10:35:08月度論壇發(fā)貼之星
日期:2015-09-30 22:25:002015亞冠之阿爾沙巴布
日期:2015-10-03 08:57:39程序設(shè)計版塊每日發(fā)帖之星
日期:2015-10-05 06:20:00每日論壇發(fā)貼之星
日期:2015-10-05 06:20:002015年亞冠紀念徽章
日期:2015-10-06 10:06:482015亞冠之塔什干棉農(nóng)
日期:2015-10-19 19:43:35程序設(shè)計版塊每日發(fā)帖之星
日期:2015-10-21 06:20:00每日論壇發(fā)貼之星
日期:2015-09-14 06:20:00
4 [報告]
發(fā)表于 2009-05-11 15:18 |只看該作者
原帖由 MaxWu 于 2009-5-11 14:55 發(fā)表
return _("it is based on your username");

這里的下劃線是做什么用的呢?

那就是個宏,具體什么作用要看它的定義

BTW, 單從語法看,也可以是個函數(shù)。不過 _ 通常是個和 gettext 相關(guān)的宏。

[ 本帖最后由 MMMIX 于 2009-5-11 16:49 編輯 ]

論壇徽章:
0
5 [報告]
發(fā)表于 2009-05-11 16:09 |只看該作者
補充一下, 是Linux下的, cracklib里面的.
我來查一下是不是Macro.
先謝謝各位.

論壇徽章:
0
6 [報告]
發(fā)表于 2009-05-11 16:25 |只看該作者

很多 軟件 用這個來 國際化
gettext

論壇徽章:
0
7 [報告]
發(fā)表于 2009-05-11 16:26 |只看該作者
windows下肯定沒有的 吧,我從來沒用過。
定義寬字符是用T或者L吧。你這個沒見過。

論壇徽章:
0
8 [報告]
發(fā)表于 2009-05-11 16:35 |只看該作者
是個宏,功能看定義

論壇徽章:
0
9 [報告]
發(fā)表于 2009-05-11 17:37 |只看該作者
  對,gettext,下面這個message可以做解釋.

Re: _() Macro
From: Trevor Johnson <trevor jpj net>
To: Andreas Sliwka <goff nef wh uni-dortmund de>
cc: gtk-app-devel-list redhat com
Subject: Re: _() Macro
Date: Sat, 20 Nov 1999 07:26:36 -0500 (EST)
> Hi,

Hi, Andreas.

>   I jsut read the gnome documentation and found in gnomeabout.html the
>   macro _() (it wasnt defined but used). The corresponding text says:
>  >note that the descriptive text is surrounded by the _(). This will have
>  > the text translated to the the user's language at runtime.
>
>  How is this done? Where do I find more information/documentation about this?

If you have GNU gettext, you can read about it on one of the gettext info
pages:

     Many packages use `_' (a simple underline) as a keyword, and write
  `_("Translatable string"' instead of `gettext ("Translatable
  string"'.  Further, the coding rule, from GNU standards, wanting that
  there is a space between the keyword and the opening parenthesis is
  relaxed, in practice, for this particular usage.  So, the textual
  overhead per translatable string is reduced to only three characters:
  the underline and the two parentheses.  However, even if GNU `gettext'
  uses this convention internally, it does not offer it officially.  The
  real, genuine keyword is truly `gettext' indeed.  It is fairly easy for
  those wanting to use `_' instead of `gettext' to declare:

       #include <libintl.h>
       #define _(String) gettext (String)

  instead of merely using `#include <libintl.h>'.

> mfg

Mit freundlichen gruessen.
__
Trevor Johnson
您需要登錄后才可以回帖 登錄 | 注冊

本版積分規(guī)則 發(fā)表回復(fù)

  

北京盛拓優(yōu)訊信息技術(shù)有限公司. 版權(quán)所有 京ICP備16024965號-6 北京市公安局海淀分局網(wǎng)監(jiān)中心備案編號:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年舉報專區(qū)
中國互聯(lián)網(wǎng)協(xié)會會員  聯(lián)系我們:huangweiwei@itpub.net
感謝所有關(guān)心和支持過ChinaUnix的朋友們 轉(zhuǎn)載本站內(nèi)容請注明原作者名及出處

清除 Cookies - ChinaUnix - Archiver - WAP - TOP