// Name:  McCabe, Micheal H.
// Date:  March 18, 2009
// Project:   Simple_Calculator_V5
// Filename: calc_headers.h

// File Edit History:
//
// This is very much a work in progress.  File created on 03/18.  Last edit
// on 03/22.
//
// List of library functions needed.

#include <iostream>
#include <string>
#include <iomanip>
#include <fstream>
#include <cstdlib>
#include <cmath>

// Namespace definition

using namespace std;

// Compiler definitions

#define MAX_USER_LIST 100


#define N1			       Data[1]
#define N2			       Data[2]
#define USER_ENTRIES	   Data[0]
#define START_USER_DATA	   3

#define HELP_e 		 "'e'  to enter N1 and N2\n"
#define HELP_i		 "'i'  to enter a list of values (Q to stop)\n"
#define HELP_fi      "'fi' File input:  prompt for a filename and read values into list [] \n"
#define HELP_fo      "'fo' File Output: prompt for a filename and write list values out. \n"
#define HELP_plus    "'+'  Add (N1 + N2) \n"
#define HELP_minus   "'-'  Subtract (N1 - N2) \n"
#define HELP_star    "'*'  Multiply (N1 * N2) \n"
#define HELP_slash   "'/'  Divide (N1 / N2) \n"
#define HELP_caret   "'^'  Raise any real N1 to the power of N2 for any integer N2 (+|-) \n"
#define HELP_exclaim "'!'  Calculate the factorial for any integer N1 (round if real) \n"
#define HELP_c       "'c'  Clear (N1, N2) \n"
#define HELP_cL      "'cL' Clear the memory list of all values. \n"
#define HELP_h       "'h'  Help \n"
#define HELP_l       "'l'  List all the values currently in List () \n"
#define HELP_q       "'q'  Quit \n"
#define HELP_o       "'o'  Output the last calculation results to the screen. \n"
#define HELP_a       "'a'  Average of the values in list [] \n"
#define HELP_d       "'d#' Delete the value at the index # in List [] \n"
#define HELP_m       "'m#' Memorize (save) the last calculation result at index # in list. \n"
#define HELP_s       "'s'  Sum all the values in List [] \n"
#define HELP_sd      "'sd' Calulate the standard deviation in the list [] \n"
#define HELP_p       "'p'  Calculate the product of the values in the list \n"
#define HELP_M1      "'M1' Prompt for index '#' and store N1 into list[#] \n"
#define HELP_M2      "'M2' Prompt for index '#' and store N2 into list[#] \n"
#define HELP_N1      "'N1' Prompt for index '#' and store List[#] into N1 \n"
#define HELP_N2      "'N2' Prompt for index '#' and store List[#] into N2 \n"
#define NO_COMMAND	 " No command recognized\n"
#define CMD_PROMPT   "Enter Command: "

// Function prototypes

void helpscreen();
bool IsDigit(char chr2);
int ReadInputFile(int start, float data[]);
int WriteOutputFile(int start, float data[]);
void enterN1N2(float data[]);
float adder(float V1, float V2);
float subtractor(float V1, float V2);
float multiplier(float V1, float V2);
float divider(float V1, float V2);
float exponentiator(float V1, float V2);
int factorial (int num);
void clearn();
void clearl();
void list_data(float data[]);
float sum(float data[]);
float mean(float data[]);
float list_product(float data[]);
float standard_deviation(float data[]);




