473,396 Members | 1,810 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Two quick Questions

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 ***
Nov 21 '05 #1
7 981
<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/>
Nov 21 '05 #2

That would be VB6 Is there a difference?

*** Sent via Developersdex http://www.developersdex.com ***
Nov 21 '05 #3
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
Ja**********@hotmail.com

On Fri, 1 Jul 2005 17:56:27 +0200, "Herfried K. Wagner [MVP]"
<hi***************@gmx.at> wrote:
<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?


Nov 21 '05 #4
<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/>
Nov 21 '05 #5
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
Nov 21 '05 #6
Cor,

"Cor Ligthert" <no************@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/>

Nov 21 '05 #7
upon running a quick console app:

MsgBox(19 Mod 6.7)

does indeed return 5.6

-----------------------
So, this implies that 19 mod 6.7 = 5.6
-Jason Kendall
Ja**********@hotmail.com


Nov 21 '05 #8

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.