SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    SitePoint Enthusiast
    Join Date
    Jun 2010
    Posts
    49
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    How to convert from ascii to its ingeger number

    Hi, I have a quastion, I am currently passing in a number as a string to my function (this is hard to change since its a program that generates the numbers).

    For example i pass the number function random('252'), but what I want is this
    function random(252).


    So my quastion is, do you guys have a clever idea on how to take this string, this ascii number and convert it to its "real" integer value, so that i can make correct calculations?

    Thaks

  2. #2
    SitePoint Enthusiast
    Join Date
    Jun 2010
    Posts
    49
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Never mind, solved it, admin can trash this thread

  3. #3
    Utopia, Inc. silver trophy
    ScallioXTX's Avatar
    Join Date
    Aug 2008
    Location
    The Netherlands
    Posts
    9,069
    Mentioned
    153 Post(s)
    Tagged
    2 Thread(s)
    Quote Originally Posted by aka.snowball View Post
    Never mind, solved it, admin can trash this thread
    Nah, we don't do that
    Could you post the answer for other members who might be having the same question to see?
    Rémon - Hosting Advisor

    SitePoint forums will switch to Discourse soon! Make sure you're ready for it!

    Minimal Bookmarks Tree
    My Google Chrome extension: browsing bookmarks made easy


Bookmarks

Posting Permissions

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