Results 1 to 4 of 4
  1. #1
    oneprotect is offline Member
    Join Date
    Jan 2011
    Posts
    2
    Rep Power
    0

    Default Dollar sign in a while statement

    Hi!

    I've just found this snippet..
    Java Code:
    while ((s = this.val[COLOR="Red"][B]$[/B][/COLOR]reader.readLine()) != null)
    It's also used again later on:
    Java Code:
    FFVideoSnapshotParser.access[COLOR="Red"][B]$0[/B][/COLOR]().logNewLine(s);
    And I'm wondering what the dollar sign up there does.

    I've Googled this for a while but haven't found anything.. (Google doesn't search for the dollar sign and a literal "dollar sign" search turns up different thigns on the whole.

    Thanks!

  2. #2
    JosAH's Avatar
    JosAH is offline Moderator
    Join Date
    Sep 2008
    Location
    Voorschoten, the Netherlands
    Posts
    13,447
    Blog Entries
    7
    Rep Power
    20

    Default

    A dollar sign is a valid identifier character (as all monetary unit characters are). I don't find them very readable.

    kind regards,

    Jos
    cenosillicaphobia: the fear for an empty beer glass

  3. #3
    oneprotect is offline Member
    Join Date
    Jan 2011
    Posts
    2
    Rep Power
    0

    Default

    Then what is the use of the dollar sign here? I'm quite sure it does not represent a monetary value in this scenario.

  4. #4
    JosAH's Avatar
    JosAH is offline Moderator
    Join Date
    Sep 2008
    Location
    Voorschoten, the Netherlands
    Posts
    13,447
    Blog Entries
    7
    Rep Power
    20

    Default

    Quote Originally Posted by oneprotect View Post
    Then what is the use of the dollar sign here? I'm quite sure it does not represent a monetary value in this scenario.
    Don't ask me, ask the author of that code; it could be decompiled code, i.e. if there is a class Inner in the scope of a class Outer, the compiler names that class Outer$Inner. If it is an anonymous class the compiler gives them a rank number.

    kind regards,

    Jos
    cenosillicaphobia: the fear for an empty beer glass

Similar Threads

  1. the @sign
    By dinosoep in forum New To Java
    Replies: 2
    Last Post: 03-28-2010, 11:07 AM
  2. problem sending Dollar symbol in SMS
    By neerajsaxena in forum Advanced Java
    Replies: 1
    Last Post: 01-28-2010, 06:37 PM
  3. sign finder
    By iPetey in forum New To Java
    Replies: 6
    Last Post: 05-01-2009, 05:24 AM
  4. How To self sign applet
    By Chintan Patel in forum Java Applets
    Replies: 1
    Last Post: 03-16-2009, 02:31 PM
  5. Replies: 1
    Last Post: 10-20-2008, 07:35 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •