They were. Plus a typo. :)
Compiles and works now. Thanks for the insight. I get it now.
I know I'm an undisciplined programmer. Thanks again for taking the time to review my efforts.
Type: Posts; User: Buckeye Bing
They were. Plus a typo. :)
Compiles and works now. Thanks for the insight. I get it now.
I know I'm an undisciplined programmer. Thanks again for taking the time to review my efforts.
Text for main.c uploaded to Google drive. Thank you.
main.c - Google Drive
wanted to add the program is a work in progress from a spreadsheet that models a two stage distillation.
Sorry... guess I'm not being clear.
The function calc vap abv and 2 of its parameters are errored as being undeclared. Oddly, 5 other parameters not mentioned.(???)
The functions are prototyped...
haha... OK.
Still kinda new at this. To me, compiler is saying I haven't declared the parameters to calc vap abv. So perhaps it was a syntax error because the program executes fine with the...
Compile hangs up at calc_run_time1 call for calc_vap_abv.
Error message is: 'argument' undeclared (first use in this function).
Full code is lengthy so these are pertinent snippets.
The...
Wow! ;) Thank you for the code.
I was aware of 2D arrays but haven't employed any yet. Time to give them some more study.
This program will be the third module in a series I've written for hobby...
This will be a calculator for proofing spirits in accordance with Federal standards. The method uses tables established by the Tax and Trade Bureau. The data set is large; 1 to 200 proof over a...
Taking to heart the aforementioned cumulative addition errors; I'd like to improve the way my functions iterate by adding lots of small numbers. Functions calc_bp, calc_xw and calc_yd are the same...
thmm-- Thanks. I did see it eventually. I'm a total noob but still...
Salem-- Appreciate it. I'd gotten that advice here before. Different context. Have to keep it in mind.
It seems like I'm not initializing the array to zero. Trying to get a list incremented from 1 by 0.2. Simple. :redface: What am I missing?
Thanks.
Edit: Never mind:redface::redface::redface:
...
Thank you. Much appreciated.
Gained a little insight into pointers as well. :)
The goal is to calculate the total mols in a binary mix given the total volume and vol% concentration.
Trying to pass 3 functions to another function, only two of which take an argument.
One...
Trying to write to file via function. Loop writes to screen properly but same syntax in the write_report function 'i' does not increment. ??? Thanks for help.
Before anybody answers this... I see...
Trying to write to file via function. Loop writes to screen properly but same syntax in the write_report function 'i' does not increment. ??? Thanks for help.
#include <stdio.h>#include...
Thanks much. Appreciate the help.:biggrin:
Looks like I got a little sloppy but also learned a couple things. Works now. For loop also needed to define low and high but does return the correct...
I had written, with considerable help from this forum, a program the computes the vapor liquid equilibria of a mixture. Now adding a second part that uses the VLE arrays to compute various 'states'...
Thank you for the detailed lesson. All seems so simple now. Also understand clearly now how sizeof is used to determine array length and size_t is used as a for loop variable. Good learning there.
...
I'm misinterpreting something. Getting errors I don't understand. Doesn't help that I'm still new to arrays/pointers. Punching above my weight, but trying to learn.
Goal is to pass the array of...
Use getch(0) to pause your program. It will continue when you hit any key.
If you want it to be the 'return' key' its a little more involved.
Your return statement is malformed. :o:o:o
Think I'd know better by now.
Also a bit chagrined I've omitted some of the keywords handed to me on a platter. :o
Your other corrections and...
I've revised calc_abv function proposed by laseright and hodor by shifting the array of coefficients to main(). In this manner I can use the same code for the inverse function, calc abw for abv. Just...
Thank you for your review and advice.
Yes, I found that eventually. In fact, the pointer created the problem. The first pass returned a correct value of 100 (boil pt of water). When the...
Until we have a quantum theory of non ideal mixtures...:biggrin:
I think there's some pretty good data out there but mostly behind pay walls. Dortmund Data Bank is a good source but they are only...
For the record: The source data are from Perry's Chemical Engineering Handbook - 7th ed. Table 2-111 "Densities of Mixtures of (ethanol and water) at 20 deg C. Edwin Croissant fit the data at...
[COLOR=#333333]
Nice lesson in display. Thank you for that.
Astute. :cool: