Home All Groups Group Topic Archive Search About
Author
1 Jul 2005 3:30 PM
JoeCoolOH
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





*** Sent via Developersdex http://www.developersdex.com ***

Author
1 Jul 2005 3:56 PM
Herfried K. Wagner [MVP]
<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?

--
M S   Herfried K. Wagner
M V P  <URL:http://dotnet.mvps.org/>
V B   <URL:http://classicvb.org/petition/>
Author
1 Jul 2005 5:04 PM
JoeCoolOH
That would be VB6 Is there a difference?

*** Sent via Developersdex http://www.developersdex.com ***
Author
1 Jul 2005 5:17 PM
Herfried K. Wagner [MVP]
<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/>
Author
1 Jul 2005 5:52 PM
Cor Ligthert
Herfried,

>> 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?

Cor
Author
1 Jul 2005 6:00 PM
Herfried K. Wagner [MVP]
Cor,

"Cor Ligthert" <notmyfirstn***@planet.nl> schrieb:
>>> 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?

Without additional tools:  No.

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/>
Author
1 Jul 2005 5:11 PM
Jason Kendall
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?
Author
9 Jul 2005 12:56 AM
Dave Cousineau ( Sahuagin )
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