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

Home Posts Topics Members FAQ

Global var in Balance calculation

Hello everyone...
Anybody can help me on this question, please?
i´ve this code in my application:

/*for Card creation*/
typedef struct card
{
etc,etc
} Card;
typedef Card *PtrCrt;

/*For trans creation*/
typedef struct trans
{
etc,etc
} Trans;
typedef Trans *PtrTrans;

I need to calculate the Balance of every card and how put this verification
in one function?!
Jan 21 '07
13 1987
Jeff Mullen <41*@nls.netwri tes:
Flash Gordon wrote:
Jeff Mullen wrote, On 22/01/07 07:47:
<snip>
P.S.

http://www.nls.net/mp/413/sea.ZIP

Self-expanding arrays. (This is the code your college professor
warned you about.) :) :) :)
Extracts from the code in the archive above...
from sea.h:
[snip]
>
Thank you for looking my code over. I hope that all the people
whom you provide with unsolicited reviews will be as forthright,
and in as much a position to make changes regarding your constructive
criticism, as I am.

As a matter of internet etiquette, you should have sent me a private
email about this--not because the message might air some "dirty
laundry" of mine (I don't care about that if it improves the code),
but because, as I am rather busy, the message on a usenet list might
expire before I can get back to it. Thankfully, that was not the
case this time. You should also consider asking people whether
they would like their code reviewed when they do not explicitly
request this service. As I pointed out, I appreciate your efforts,
but you should be more sensitive to the possibility of other points
of view.
If you don't want your code publicly reviewed, I suggest not making it
publicly available. If you don't want it reviewed in this newsgroup,
don't post a link to it in this newgroup. The review was as much for
the benefit of other readers who saw the link as it was for you.

--
Keith Thompson (The_Other_Keit h) ks***@mib.org <http://www.ghoti.net/~kst>
San Diego Supercomputer Center <* <http://users.sdsc.edu/~kst>
We must do something. This is something. Therefore, we must do this.
Feb 2 '07 #11
Jeff Mullen said:

<snip>
Thank you for looking my code over. I hope that all the people
whom you provide with unsolicited reviews will be as forthright,
and in as much a position to make changes regarding your constructive
criticism, as I am.

As a matter of internet etiquette, you should have sent me a private
email about this
Wrong. Post here, read here.

--
Richard Heathfield
"Usenet is a strange place" - dmr 29/7/1999
http://www.cpax.org.uk
email: rjh at the above domain, - www.
Feb 2 '07 #12
On Thu, 01 Feb 2007 19:43:37 -0500, in comp.lang.c , Jeff Mullen
<41*@nls.netwro te:
>As a matter of internet etiquette, you should have sent me a private
email about this--
This is usenet: write here, read here.
>because, as I am rather busy, the message on a usenet list might
expire before I can get back to it.
So you mean that because /you're/ busy, the dozens of people reading
your posting have to send you individual messages. Don't you think
thats a bit absurd?
>case this time. You should also consider asking people whether
they would like their code reviewed when they do not explicitly
request this service.
One of the things that happens to code here in CLC is that it gets
reviewed. If you don't want your code reviewed, the fix is - don't
post it or link to it.

Of course, if you don't post it, then its awfully hard for people to
help you with any problems with it. You're likely to get lots of
replys along hte lines of "my crystal ball is broken, but I think its
line 42".
--
Mark McIntyre

"Debugging is twice as hard as writing the code in the first place.
Therefore, if you write the code as cleverly as possible, you are,
by definition, not smart enough to debug it."
--Brian Kernighan
Feb 2 '07 #13
Keith Thompson wrote, On 02/02/07 02:13:
Jeff Mullen <41*@nls.netwri tes:
>Flash Gordon wrote:
>>Jeff Mullen wrote, On 22/01/07 07:47:
<snip>
>>Extracts from the code in the archive above...
from sea.h:
[snip]
>Thank you for looking my code over. I hope that all the people
whom you provide with unsolicited reviews will be as forthright,
<snip>
If you don't want your code publicly reviewed, I suggest not making it
publicly available. If you don't want it reviewed in this newsgroup,
don't post a link to it in this newgroup. The review was as much for
the benefit of other readers who saw the link as it was for you.
For the record, I consider any posting of code here (or links to such
code) to be, amongst other things, a request for it to be reviewed so no
review can be considered unsolicited. This includes any code I post, of
course, and whilst I don't like having my errors pointed out I like even
less having the errors left uncorrected.

I agree with the rest of what Ben, Keith and Richard posted as well.
--
Flash Gordon
Feb 2 '07 #14

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

Similar topics

3
10584
by: Greg | last post by:
On my report I want to have an opening balance signifying all transactions up to the month selected and detailed transactions for the month selected and then a closing blance. I'm perpelexed how to do this Anyone knows how the banks do it with statement formatting? suggestions, ideas welcome.
5
6775
by: bobdydd | last post by:
Hi Guys Can anyone help I am trying to find a way to implement a running balance that will re-calculate if the date order is changed, or if an earlier record is changed like you might want to do during a bank statement reconcile. I am using the following fields Date|Payment|Deposit|Running_Balance (tblTransactions)
13
2156
by: RobcPettit | last post by:
Hi, after reading up, c# doesnt appear to use gloal variables. Alot of post advise against them also. So Im wondering how to get around this. Im trying to do a calculation, retain the result, do another calculation then add the result to my retained value etc. my values: Im backing then laying horses. So I back first, say with a return of £20 if it wins. Then I lay the horse with an offset bet giving me an overall return of £1. Ok, so I...
2
4032
by: mauking | last post by:
Hello Everyone, Im a certified public accountant here in the Philippines. Im using microsoft access 2000 and 2003 running in a Windows XP environment. Im having a problem of how to calculate a running balance using a query coming from two tables. This is my problem. I have two tables (Sales and Collections), with these table I wanted to have a query to recalculate a running balance everytime there is a sales and collections...
3
5178
by: Paul H | last post by:
I have a transactions table and a balance table that look something like this: tblTransactions TransactionID (PK Autonumber) ClientID TransactionDate TransactionAmount (currency field, values must be >0) CRDR (indicates whether the transaction is a (credit or debit) StatementDate (Date stamp applied when the “Statement” report is run)
0
1390
by: dustonheaven | last post by:
I need to calculate running balance on data containing Null, which is sorted by few columns. As example below, Clr is sorted by Null Desc, then by date, then just by ID. So far, I just come out with this... SELECT tr1.Clr, tr1.ID, tr1.Date, tr1.Acc, tr1.Dbt, tr1.Cdt, (SELECT SUM(Nz(tr2.Dbt) - Nz(tr2.Cdt)) FROM tbl00 AS tr2 WHERE (tr2.Acc = tr1.Acc AND tr2.Clr <= tr1.Clr)) AS Bal FROM tbl00 AS tr1 WHERE (((tr1.Acc)=12345) AND...
1
3018
maxx233
by: maxx233 | last post by:
I need to figure out a way to generate a report to find customers in our DB that have unused credits on their account so we can void them out periodically - we manually assign them credits, they make purchases, but if they don't use the full balance of the credits in 24 hours we can negate the leftover (it's a promotional thing.) There's two problems I'm wrestling with though - The table doesn't have a running balance field (not that big of...
1
2539
by: darendaren88 | last post by:
I have created this table: mysql> describe acount; +----------+---------------+------+-----+---------+----------------+ | Field | Type | Null | Key | Default | Extra | +----------+---------------+------+-----+---------+----------------+ | uniqueID | bigint(20) | NO | PRI | NULL | auto_increment | | amount | decimal(20,0) | NO | | NULL | | | BALANCE | decimal(20,2) | NO | |...
0
8683
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
8611
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9170
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
9031
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
8904
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
8876
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...
0
7741
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6531
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
4624
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?

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.