Discussion Board

Results 1 to 7 of 7
  1. #1
    Registered User lizhiwei's Avatar
    Join Date
    Jul 2007
    Posts
    36
    _LIT(KRmVersion, "$VERSION$");
    前面的$是什么意思啊?

  2. #2
    Nokia Developer Champion beover1984's Avatar
    Join Date
    Jun 2005
    Location
    Beijing
    Posts
    5,578
    有可能是在解析字符串时的定界符.
    Beover1984
    -----------
    Doing what comes naturally

  3. #3
    参考SDK » Symbian OS v9.1 » Symbian OS reference » C++ component reference » Base E32 » _LIT
    后面一个参数是字符串值,这里的$你要根据上下文看了。
    I'd just be the catcher in the rye
    hoolee

  4. #4
    Registered User lizhiwei's Avatar
    Join Date
    Jul 2007
    Posts
    36
    Quote Originally Posted by hoolee View Post
    参考SDK » Symbian OS v9.1 » Symbian OS reference » C++ component reference » Base E32 » _LIT
    后面一个参数是字符串值,这里的$你要根据上下文看了。

    _LIT (name, s) const static TLitC<sizeof(L##s)/2> name={sizeof(L##s)/2-1,L##s}
    Description
    Constructs a build independent constant literal descriptor of type TLitC<TInt> with the specified name and text.

    An 8-bit build variant is generated for a non-Unicode build; A 16-bit build variant is generated for a Unicode build.

    Parameters
    name The name of the C++ variable to be generated.

    s The literal text enclosed within a pair of double quotes.


    看了SDK,没看明白什么意思,##也不知道什么意思
    不过从别人的程序来看,这个$VERSION$很可能是运行的时候才能定的,两个$号之间是什么无所谓,只要在运行的时候填入相应的文字就可以了,我的这样理解对不对?

  5. #5
    ##是个C/C++语法,表示在带参数的宏定义中将两个子串连接起来,形成一个新的子串

    这里不要追究$的涵义了,这里应该是个宏替换,届时会换成version版本号
    I'd just be the catcher in the rye
    hoolee

  6. #6
    Registered User lizhiwei's Avatar
    Join Date
    Jul 2007
    Posts
    36
    Quote Originally Posted by hoolee View Post
    ##是个C/C++语法,表示在带参数的宏定义中将两个子串连接起来,形成一个新的子串

    这里不要追究$的涵义了,这里应该是个宏替换,届时会换成version版本号
    呵呵,你是对的,我把$VERSION$换成其他字符串也一样的,原来是和$没有关系的,
    在运行的的时候都换成了我的版本号.

  7. #7
    Registered User lizhiwei's Avatar
    Join Date
    Jul 2007
    Posts
    36
    Quote Originally Posted by beover1984 View Post
    有可能是在解析字符串时的定界符.

    一开始一看见$就懵了,没有仔细看程序

    谢谢两位的耐心解答!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Nokia Developer aims to help you create apps and publish them so you can connect with users around the world.

京ICP备05048969号  © Copyright Nokia 2013 All rights reserved