Convert number to integer
Right now I have a form that has people enter there numbers, I do some calculations and then send the projections back to them. In the form I have them enter the value without commas. I would like to make easier for people by letting them enter their values with commas (i.e. 20,000). How do I filter out the commas so that I have just the numeric value? I have to be able to evaluate thousand and millions, no decimal values.
cheers;
Hi there, this really isnt to difficult, you should be able to do something like this
cint(replace(num, ",",""))
Set your input variable to be a string, the c...
converting a string to number or integer
erm... how is this done in c#?
or convert an object to and number or integer?
I need to get the below as a number or int:
TotalRecords = conSelProdCount.ExecuteScalar().ToString();
So i can use it in:
ProductItem[] arrNews = new ProductItem[TotalRecords];
int rwcnt = 0;
while ( dtrProducts.Read())
{
string NewVar = dtrProducts["ProductName"].ToString();
arrNews[rwcnt] = new ProductItem();
arrNews[rwcnt].rowcount = @TotalRecords;
arrNews[rwcnt].ProductName = dtrProducts["Pro...
convert to integer without rounding a number
Hallo,i have a simple question:Lets say i have a decimal, 1.7 for eg and i want to convert it to integer,but WITHOUT ROUNDING THE NUMBER.So i tryed many different aproaches to do this but all failed, just the example below.I get a integer 2 instead of 1 so that means the number is rounded.If somebody knows how to do the same thing but without rounding the number please let me knowthanxSub Page_load() Dim d As Double d = 1.7 &nb...
how do I convert a fractional number to a integer in javascript?
like if I want 3 as a result from this: (19 / 6) as oposed to 3.1999...
var number = (19 / 6)
then how do I convert this to value of 3
How about using parseInt: var result = parseInt(number);C# <---> VB.Net Translator
Yep!...
converting an integer to a 2 decimal place number
hey..
say i have an integer, or a double, or any number that is less then 2 decimal places
how can i make it 2 decimal places?
eg 1 = 1.00
Cheers
Dim d As Double = 1 Response.Write(d.ToString("0.00")) Website Design Darlington - http://mdssolutions.co.ukhttp://lessthandot.com - Experts, Information, Ideas & Knowledgehttp://aspnetlibrary.com - An online resource for professional ASP.NET developersPlease remember to click "Mark as Answer" on this post if it helped y...
General question on the concept of integer handling in Delphi 2009I found in system.pas new names "NativeInt" and "NativeUInt".
According to all computer languages worldwide, Integer (and Cardinal) is
*already* a native integer that represents the CPU register for best
performance etc...
What will happen in Delphi 2010 Win64 ??? I don't want to change Integer
to NativeInt in my code thousand times to get adequate performance.
> {quote:title=Ralf Stocker wrote:}{quote}
> I found in system.pas new names "NativeInt" and "NativeUInt".
Interesting.
> According to all computer languages wor...
C# to VB : Want to convert whole project with large number of files.
Hi Experts, I am looking for a freeware (preferrably desktop app) that can convert a .net 2.0 project with large number of files from C# to VB - and of course it should be most accurate as wellI have a shareware called Instant VB (desktop app) that allows me to convert a project with maximum of 500 LoCTelerik batch converter being an online app asks me to upload each and every file individuallyDeveloper fusion code converter (online app) allows only single file at a timeAny from stated above will not help me much as the whole project needs to be convertedCan't recollect which one bu...
How to convert a hexadecimal number to normal number?
In VB.NET, how can I convert a hexadecimal number (like FF) to normal number (like 255) ??
Come on, gurus, this must be a piece of cake for you!:-)
Any help appreciated, thanks, Hooker
try to use System.Convert.ToInt16(your parameter)
hope this work...if this doesn't work there should be some method in the 'convert' class.Toronto Trade show displays | Toronto Printing Solutions | Toronto Printing...
converting delphi code to delphi .NET
Hi,I'm looking at converting quite a bit of old delphi code to delphi .NET . I'm wondering can it be converted to VB.NET for certain ? Or perhaps there are some unsupported functions etc in delphi and I should keep the code delphi ?
There are about 10,000 lines of code. Anyone brave enough to take an estimate on how long it would take to convert 10,000 lines ?is going from delphi to delphi.NET smooth ? Would going to another language cause complications ?Thanks!
mike123
Mike123,
Sorry I can not help, however, I have the s...
Converting from Delphi 2005 to Delphi XE5I have developed a number of Windows applications in Delphi 2005.
I recently purchased Delphi XE5.
I have started by trying to compile an existing 2005 application.
I am getting a 7 errors about FMXTeeEditor.
[dcc32 Error] E1026 File not found: 'FMXTee.Editor.Brush.fmx'
Not able to find a solution to this. Any help greatly appreciated.
Did you open every form before compiling? The old forms get updated with new properties when they are opened. I would make a copy of the old project before doing any of this.
maybe you have links to the older tchart files....i.e its not usi...
Convert another C++ code convert to delphiHello,
I need the following code convert to Delphi
DWORD files_count;
bool error_flag = false;
bool bResult;
for(DWORD i=0; i < files_count && bResult && !error_flag; i++)
{
if(std::find(delete_file.begin(), delete_file.end(),
i)==delete_file.end())
........
here delete_file is as
std::vector<int> delete_file
How to convert this loop and if condition?
--
Best Regards
Md. Shariful Alam Khan
"Md. Shariful Alam Khan" <murad_mouri@yahoo.com> wrote in message
news:36441@forums.codegear.com.....
Convert Delphi 7 to Delphi 2009 [Edit]Hi!
Please, I have a code done in Delphi 7...
Now I want to convert Delphi 7 to Delphi 2009 but I'm having problems when compile the code.
Error message:
+[DCC Fatal Error] Far.dpr(9): F2063 Could not compile used unit 'System.pas'+
Please can somebody help me?
Source Download (349KB): http://rapidshare.com/files/256191328/FileManager.rar.html
Mirror Source Download: http://www.megaupload.com/?d=12GYLPT0
Password: delphi
Thank u so much!
(sorry for my bad english, it is not my native language)
Edited by: loquax loquax on Jul 15, 2009 12:24 PM
Sorry, bu...
Converting Delphi for Win32 to Delphi .Net(Prism)Hi,
I am currently migrating a project from Delphi for Win32 to Delphi.net.
Part of my code currently goes into a directory and pulls out a random file from this directory and loads the contents of the file for me. This code doesn't seem to work in Delphi.Net. It uses PString and a number of functions in SysUtils that don't seem to be present in Delphi.net's SysUtils file.
If anyone can help me please, it would be greatly appreciated!
Many thanks,
Jonathan Mackey
Jonathan Mackey a écrit :
> I am currently migrating a project from Delphi for Win32 to
&...
Delphi 2010*Upgrading from Delphi 2007 to Delphi 2010*
(as of February 1, 2010)
I bought a new computer in December and decided to upgrade from Delphi 2007 to Delphi 2010. Here are some lessons learned related to the Delphi upgrade, which I hope will make a similar transition easier for others. I still have an insurmountable problem with the speed of the IDE (#13 below).
As background, my old system had 3 GB of RAM, 40GB of unused disk, a 3.8 GHz CPU, and ran under Windows XP. My new system has 12 GB of RAM, 770GB of unused disk, a quad core 2.67 GHz CPU, and runs under Win7 Home Edition.
...