Indigo Rose Software

Professional Software Development Tools

 
Results 1 to 8 of 8
  1. #1
    Join Date
    Oct 2005
    Posts
    572

    how i change from string "123" to number 123

    how i change from string "123" to number 123

  2. #2
    Join Date
    Jul 2002
    Location
    USA
    Posts
    3,959
    Quote Originally Posted by lnd
    how i change from string "123" to number 123
    nNumber = String.ToNumber("123")

  3. #3
    Join Date
    Oct 2005
    Posts
    572

    i am sory i deed to convert a number to string

    i am sory i deed to convert a number to string

  4. #4
    Join Date
    Jul 2002
    Location
    USA
    Posts
    3,959
    No need to convert it, but if you feel you need to, do something like this

    nNum = 123;
    sNum = nNum .. "";

  5. #5
    Join Date
    Oct 2005
    Posts
    572

    i dont no

    the code


    tbFiles = FTP.ListFiles();

    -- add each item to the listbox in this format:
    -- <name> (<size>) (<date>)
    for i = 1, tbFiles.Count do
    local name = tbFiles[i].Name;
    local size = tbFiles[i].Size;
    local date = tbFiles[i].Date;

    ListBox.AddItem("ListBox1", name, "");
    end

    Label.SetText("Label6", tbFiles);

    error in - must be a string - Label.SetText("Label6", tbFiles);

  6. #6
    Join Date
    Jul 2002
    Location
    USA
    Posts
    3,959
    tbFiles is a table. You need to specify which element in the table you want.

    Label.SetText("Label6", tbFiles[1].Name);

  7. #7
    Join Date
    Oct 2005
    Posts
    572

    and if i need the i and the i is a number

    and if i need the i and the i is a number the code

    nNum = 123;
    sNum = nNum .. "";

    dont work on my code?

  8. #8
    Join Date
    Dec 2003
    Location
    Location! Location!
    Posts
    6,137
    There are a couple other ways, one I have used is:

    "'"..strMyStringHere.."'"

    Note the single quote between the double-quotes.
    Intrigued

Similar Threads

  1. number to string
    By Infinity in forum AutoPlay Media Studio 5.0
    Replies: 8
    Last Post: 10-01-2004, 05:47 PM
  2. Parse Numeric string in Number
    By Lancill in forum AutoPlay Media Studio 4.0
    Replies: 6
    Last Post: 03-05-2003, 07:21 PM
  3. Find a number in a string
    By Lancill in forum AutoPlay Media Studio 4.0
    Replies: 5
    Last Post: 03-05-2003, 09:25 AM
  4. HOWTO: Limit the Number of Times an Install can be Run
    By Support in forum Setup Factory 6.0 Knowledge Base
    Replies: 0
    Last Post: 10-17-2002, 02:58 PM

Posting Permissions

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