Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Absolute value of a value
Message
De
10/11/2011 16:40:57
 
 
À
10/11/2011 16:37:40
Information générale
Forum:
ASP.NET
Catégorie:
Code, syntaxe and commandes
Versions des environnements
Environment:
VB 9.0
OS:
Windows 7
Network:
Windows 2003 Server
Database:
MS SQL Server
Application:
Web
Divers
Thread ID:
01528610
Message ID:
01528621
Vues:
52
J'aime (1)
>>You don't want Abs( ), you want the .Net equivalent of the VFP FLOOR( ) function.
>
>I still haven't find the equivalent in .NET. I tried variations of Math.Round(). As far as Math.Abs(), it simply returns the same thing. I do not understand that one. CInt() rounds to the nearest integer. So, that is not good as well.
>
>Math.Floor() seems to be the equivalent. I made some tests with it and so far that works.

The absolute value is just the magnitude of a number, regardless of its sign (positive or negative). Its return value is always positive.

Abs( 1.39 ) = 1.39
Abs( -1.39 ) = 1.39
Regards. Al

"Violence is the last refuge of the incompetent." -- Isaac Asimov
"Never let your sense of morals prevent you from doing what is right." -- Isaac Asimov

Neither a despot, nor a doormat, be

Every app wants to be a database app when it grows up
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform