Computing.Net > Forums > Programming > MaximumValue & MinimumValue (VB6)

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.

MaximumValue & MinimumValue (VB6)

Reply to Message Icon

Name: bertyzz
Date: February 26, 2003 at 06:41:23 Pacific
OS: XP
CPU/Ram: 1.3gig
Comment:

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



Sponsored Link
Ads by Google

Response Number 1
Name: BelAnWel
Date: February 26, 2003 at 11:41:48 Pacific
Reply:

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.


0

Response Number 2
Name: borelli34
Date: February 26, 2003 at 12:51:21 Pacific
Reply:


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


0

Response Number 3
Name: bertyzz
Date: February 26, 2003 at 14:23:27 Pacific
Reply:

Hi Guys,

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


Thanks

Bertyz


0

Response Number 4
Name: BelAnWel
Date: February 26, 2003 at 15:03:38 Pacific
Reply:

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


0

Response Number 5
Name: bertyzz
Date: February 26, 2003 at 15:18:29 Pacific
Reply:

I thought an 'Integer' number was a whole number!! Or am I being really thick :)


0

Related Posts

See More



Response Number 6
Name: borelli34
Date: February 26, 2003 at 19:39:59 Pacific
Reply:

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


0

Sponsored Link
Ads by Google
Reply to Message Icon

what is the meaning of re... Online forums



Post Locked

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


Go to Programming Forum Home


Sponsored links

Ads by Google


Results for: MaximumValue & MinimumValue (VB6)

VB6 screen capture www.computing.net/answers/programming/vb6-screen-capture/4770.html

VB6 Question www.computing.net/answers/programming/vb6-question/7840.html

How to develop Shareware in vb6 www.computing.net/answers/programming/how-to-develop-shareware-in-vb6/11070.html