code for Ascii value?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • datttanand
    New Member
    • Mar 2007
    • 19

    code for Ascii value?

    can anybody send me the code snippet to find the ascii value of character?
  • Ganon11
    Recognized Expert Specialist
    • Oct 2006
    • 3651

    #2
    Should be

    Code:
    System.out.println((int)yourChar);

    Comment

    • r035198x
      MVP
      • Sep 2006
      • 13225

      #3
      Originally posted by datttanand
      can anybody send me the code snippet to find the ascii value of character?
      Code:
       
      char c = 'A';
      int i = (int) c;
      System.out.println(i);

      Comment

      • datttanand
        New Member
        • Mar 2007
        • 19

        #4
        Originally posted by Ganon11
        Should be

        Code:
        System.out.println((int)yourChar);

        thanks buddy....

        but i forgot to mention that i want the code in java script....

        so please if u know that also pls reply

        Comment

        • datttanand
          New Member
          • Mar 2007
          • 19

          #5
          Originally posted by r035198x
          Code:
           
          char c = 'A';
          int i = (int) c;
          System.out.println(i);

          thanks buddy....

          but i forgot to mention that i want the code in java script....

          so please if u know that also pls reply

          Comment

          • r035198x
            MVP
            • Sep 2006
            • 13225

            #6
            Originally posted by datttanand
            thanks buddy....

            but i forgot to mention that i want the code in java script....

            so please if u know that also pls reply
            Well this is a Java forum and Java != Javascript

            I'll now move this to the Javascript forum.

            Comment

            • acoder
              Recognized Expert MVP
              • Nov 2006
              • 16032

              #7
              Use charCodeAt. See this thread and this link.

              Comment

              • datttanand
                New Member
                • Mar 2007
                • 19

                #8
                can u tell me how can i redim the array in java script just like in vb we do?

                Comment

                Working...