View Full Version : how i change from string "123" to number 123
how i change from string "123" to number 123
how i change from string "123" to number 123
nNumber = String.ToNumber("123")
i am sory i deed to convert a number to string
No need to convert it, but if you feel you need to, do something like this
nNum = 123;
sNum = nNum .. "";
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);
tbFiles is a table. You need to specify which element in the table you want.
Label.SetText("Label6", tbFiles[1].Name);
and if i need the i and the i is a number the code
nNum = 123;
sNum = nNum .. "";
dont work on my code?
Intrigued
12-30-2005, 07:45 PM
There are a couple other ways, one I have used is:
"'"..strMyStringHere.."'"
Note the single quote between the double-quotes.
vBulletin® v3.8.4, Copyright ©2000-2009, Jelsoft Enterprises Ltd.