|
web
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Two quick Questionscan some one tell me what the mod function does when you use a non
integer I am away from my vb pc. Ex 19 Mod 6.7 =? Would VB round or truncate the 6.7? The other is When compiling your ap into native code which option should you not use if your code passes arguments by reference *** Sent via Developersdex http://www.developersdex.com *** <JoeCoolOH> schrieb:
> can some one tell me what the mod function does when you use a non VB6 or VB.NET?> integer I am away from my vb pc. > > > Ex 19 Mod 6.7 =? > Would VB round or truncate the 6.7? > > The other is > > When compiling your ap into native code which option should you not use > if your code passes arguments by reference -- M S Herfried K. Wagner M V P <URL:http://dotnet.mvps.org/> V B <URL:http://classicvb.org/petition/> <JoeCoolOH> schrieb:
> That would be VB6 Is there a difference? Yes, because the VB.NET compiler doesn't compile native code.-- M S Herfried K. Wagner M V P <URL:http://dotnet.mvps.org/> V B <URL:http://classicvb.org/petition/> Herfried,
>> That would be VB6 Is there a difference? Can a VB6 program run withouth a runtimer?> > Yes, because the VB.NET compiler doesn't compile native code. > Cor Cor,
"Cor Ligthert" <notmyfirstn***@planet.nl> schrieb: Without additional tools: No.>>> That would be VB6 Is there a difference? >> >> Yes, because the VB.NET compiler doesn't compile native code. > Can a VB6 program run withouth a runtimer? However, the VB5/6 compiler supports compiling to native code opposed to P-code. -- M S Herfried K. Wagner M V P <URL:http://dotnet.mvps.org/> V B <URL:http://classicvb.org/petition/> I'm gonna take a guess that it's VB.Net.
Here's the help for the Mod operator. ------------------------------- Mod OperatorSee Also Arithmetic Operators | Operator Precedence in Visual Basic | Operators Listed by Functionality | Arithmetic Operators Divides two numbers and returns only the remainder. number1 Mod number2 Parts number1 Required. Any numeric expression. number2 Required. Any numeric expression. Result The result is the remainder left after division is performed on number1 and number2. Supported Types Byte, Short, Integer, Long, Single, Double, Decimal Remarks The Mod operator divides number1 by number2 and returns only the remainder as result. For example, in the following expression, A (result) equals 2. A = 8 Mod 3 If number1 or number2 are floating-point values, then division is carried out and the floating-point remainder is returned. The data type of the result is the same as that of the data type with the greatest range. The order of range, from least to greatest range, is Byte, Short, Integer, Long, Single, Double, and Decimal. ----------------------- So, this implies that 19 mod 6.7 = 5.6 -Jason Kendall JasonKend***@hotmail.com On Fri, 1 Jul 2005 17:56:27 +0200, "Herfried K. Wagner [MVP]" <hirf-spam-me-here@gmx.at> wrote: Show quoteHide quote ><JoeCoolOH> schrieb: >> can some one tell me what the mod function does when you use a non >> integer I am away from my vb pc. >> >> >> Ex 19 Mod 6.7 =? >> Would VB round or truncate the 6.7? >> >> The other is >> >> When compiling your ap into native code which option should you not use >> if your code passes arguments by reference > >VB6 or VB.NET? upon running a quick console app:
MsgBox(19 Mod 6.7) does indeed return 5.6 Show quoteHide quote > ----------------------- > So, this implies that 19 mod 6.7 = 5.6 > > > -Jason Kendall > JasonKend***@hotmail.com |
|||||||||||||||||||||||