Main Page | Alphabetical List | Data Structures | File List | Data Fields | Globals | Related Pages

fish.c File Reference

This file implements fishy functions. More...

#include "fish.h"

Include dependency graph for fish.c:

Include dependency graph

Go to the source code of this file.

Functions

void FillFreezer ()
 Fills the freezer with fish.

int Weigh (fishTypes inType)
 Returns the total weight of all fish of one type in the freezer.

int WeighEm (fishTypes inType)
 Returns the total weight of all fish of one type in the freezer.


Variables

fish_t freezer [MAX_FISH]
 The fish in my freezer.


Detailed Description

This file implements fishy functions.

Maybe I could say a lot more if this weren't such a simple example. But as it stands, there isn't much need for a detailed description here.

Date:
June 17 2003
Author:
Aaron Montgomery monsterworks@mac.com.

Definition in file fish.c.


Function Documentation

void FillFreezer  ) 
 

Fills the freezer with fish.

This function places four fish in my freezer. This comment provides the detailed description for this function.

Definition at line 20 of file fish.c.

References fishType_carp, fishType_none, fishType_salmon, fishType_trout, freezer, fish_t::myType, and fish_t::myWeight.

Referenced by main().

int Weigh fishTypes  inType  ) 
 

Returns the total weight of all fish of one type in the freezer.

This function iterates through all the fish in my freezer of a particular type and sums up their weights. This function replaces the defective WeighEm() function.

Parameters:
inType is the type of fish I want to weigh.
Returns:
the total weight of all fish of that type in my freezer.
Bug:
I can't figure out what's going wrong with this function.

Definition at line 38 of file fish.c.

References freezer, MAX_FISH, fish_t::myType, and fish_t::myWeight.

Referenced by main().

int WeighEm fishTypes  inType  ) 
 

Returns the total weight of all fish of one type in the freezer.

This function iterates through all the fish in my freezer of a particular type and sums up their weights.

Parameters:
inType is the type of fish I want to weigh.
Returns:
the total weight of all fish of that type in my freezer.
Deprecated:
Use Weigh instead, at least it doesn't crash.
Bug:
This seems to cause memory corruption problems.

Definition at line 58 of file fish.c.

References freezer, MAX_FISH, fish_t::myType, and fish_t::myWeight.


Variable Documentation

fish_t freezer[MAX_FISH]
 

The fish in my freezer.

Here's where we define the freezer variable, this comment provides the detailed description for this variable.

Definition at line 16 of file fish.c.

Referenced by FillFreezer(), Weigh(), and WeighEm().


Generated on Wed Apr 28 17:08:25 2004 for Fish by doxygen 1.3.4