473,698 Members | 2,179 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

The difference of uflow and underflow functions ?

Sory about stupid question.

What are differences between uflow and underflow functions ?
Pls explains.
Tks
Jul 22 '05 #1
2 3148
> Sory about stupid question.

It would have been a good question if you told us the class of these
(member) functions. I assume you are talking about the members of
std::basic_stre ambuf and derived classes.
What are differences between uflow and underflow functions ?
Pls explains.


This is what the standard has to say about it:

int_type uflow();

Requires: The constraints are the same as for underflow(), except that
the result character is trans-ferred
from the pending sequence to the backup sequence, and the pending
sequence may not be empty
before the transfer.

Default behavior: Calls underflow(). If underflow() returns
traits::eof(), returns
traits::eof(). Otherwise, returns the value of
traits::to_int_ type(*gptr()) and
increment the value of the next pointer for the input sequence.

Returns: traits::eof() to indicate failure.
--
Peter van Merkerk
peter.van.merke rk(at)dse.nl

Jul 22 '05 #2
Hi,

underflow attempts to return the current element from the input stream, but
does not advance the the input stream position. While uflow attempts to
return the current element and advances the stream position if successfull.
uflow is typically implemented by calling underflow and if underflow does
not return traits_type::eo f it adjusts the stream position.

Hope this helps

Chris Taylor
<dx****@yahoo.c om> wrote in message
news:bp******** *****@ID-134679.news.uni-berlin.de...
Sory about stupid question.

What are differences between uflow and underflow functions ?
Pls explains.
Tks



-----= Posted via Newsfeeds.Com, Uncensored Usenet News =-----
http://www.newsfeeds.com - The #1 Newsgroup Service in the World!
-----== Over 100,000 Newsgroups - 19 Different Servers! =-----
Jul 22 '05 #3

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

Similar topics

7
8493
by: Oplec | last post by:
Hello, How can underflow and overflow of the basic arithmetic types be tested for using standard C++? For instance, if two long doubles are multiplied together, test whether or not the result is too large to fit in a long double? Thank you for your time, Oplec.
1
2231
by: Alan Johnson | last post by:
The std::streambuf class defines both of these functions as virtual, and they are apparently meant to be overloaded in derived classes to get more characters from an input sequence. Could someone explain what the difference between the two is, please? Alan
17
760
by: Nathan Given | last post by:
Hello All, I am trying to debug a broken query. The query uses Left$(,4) instead of Left(,4). What is the difference between the Left() and Left$() functions in Microsoft Access? Thanks! --
5
9227
by: Ian Pilcher | last post by:
I'm trying to figure out if an increment to a variable of an integer type, followed by a decrement, (or vice versa) is guaranteed to restore the variable to its initial value, even if the first operation causes the variable to overflow/underflow. In other words, if foo_t is an integer type, are the following two functions guaranteed to *always* return a non-zero value? int check_overflow(foo_t f) {
13
7780
by: tings | last post by:
An article states: "In floating point maths, where if you divide by a sufficiently large number sufficiently often, you will always be able to reach a value too small to distinguish from zero, given the finite precision you have." What happens when "a value too small to distinguish from zero" is reached by the above division? Underflow? What does it mean "sufficiently often" since only one division should be enough to cause underflow...
2
3738
by: alok | last post by:
I am getting inconsistent behvior on Linux and Solaris platfors while computing doule ( 64 bit precision ) multiplications. I have following two double numbers whose integer representation is as following I have a union typedef union { double double_val; unsigned long long uint_val;
83
15584
by: rahul8143 | last post by:
hello, what is difference between sizeof("abcd") and strlen("abcd")? why both functions gives different output when applied to same string "abcd". I tried following example for that. #include <stdio.h> #include <string.h> void main() { char *str1="abcd";
4
3602
by: glenn | last post by:
I have a COM Server I've written in C#. I have a client app I've written in Delphi that is calling the C# COM Server. However, one of the functions in the COM Server creates a form and during the creation process it receives the Overflow or Underflow in arithmetic operation error. I have traced it down to the section of the for where its registering the components... this.Controls.Add(this.cmd_exit); it doesn't matter which control...
1
1790
by: Harris Kosmidis | last post by:
I have a problem which I think is due to overflow/underflow. I want to segment an Image using SOM network. Code follows: ============================================================================================== struct MyImage { int width, height; long int num_pixels; short int *tag; unsigned char *R, *B, *G;
0
8674
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9157
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9028
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8895
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8861
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
6518
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
4619
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3046
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
2001
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.