Tom's Guide | Tom's Hardware | Tom's Games
![]() |
![]() |
![]() |
Hi Guys,
I've been trying to find out what the 'MaximumValue & MinimumValues' values in VB6 are. I have looked through several VB books but cant seem to find the answer!My problem is that I have to write a calculator program (for a college assignment), I have completed all the functions, i.e: The addition, subtraction, division etc, but I need to set 'MaximumValue & MinimumValues'. The thing is I dont know what these values are or what code I need.
Can anyone help me with this?
Thanks
Bertyzz

it depends on what data type of the variable you are using. integers, long integers, double, single are on the top of my head. use "data type" as the search key to display their min & max values.

========================================================================================
In addition to what BelAnWel stated, a few other pieces of information might prove helpful. First, the limitations are relative to the type of numbers represented. As you are writting a calculator program, decimal numbers will be required. If you where to deal with only whole numbers then you could represent a value range of -2,147,483,648 to +2,147,483,647. Decimal values, however, are noted differently in the specifications for them (and it should be mentioned that they are also represented on a binary level in a much different way then standard integer values are. This format is called BCD or Binary Coded Decimal and can differ depending upon the actual data type). The largest valued real number that is a pre-defined data type in VB6 is the Double precision data type which allows you to represent a range of -1.79769313486232E308 to -4.94065645841247E-324 for negative values and 4.94065645841247E-324 to 1.79769313486232E308 for positive values. As you can see, the decimal representations in VB use extended notations and are represented on a bit level by 3-4 fields or "segments" of the overall data in memory. Depending on how and what processing of these numbers you use, this can have a significant effect on how you must design your program but in most cases you will not have to take this into account. I hope this sheds some light on what you need to know.borelli34

Hi Guys,
Thanks for your help, just to let you know the data type that I am using is 'integer'.
ThanksBertyz

but if ur writing a calculator program, the program will be limited to whole numbers only, no decimals.

An integer number is a whole number (as in the whole portion BEFORE a decimal and NOT containing any decimal value or fraction of a number). A real number contains both the whole part and a fraction of a whole number in the form of a decimal value.
borelli34

![]() |
what is the meaning of re...
|
Online forums
|

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.
| Ads by Google |