Thank you, rstanley. I run gcc and clang.
Type: Posts; User: BillMcEnaney
Thank you, rstanley. I run gcc and clang.
rstanley,
You're right. I can program in C. But I'm trying to do what a professor told me when I audited a course about algorithms. He said, "Find a language to excel at and always use it." It...
Thank you for the excellent tips, rstanley. I'll do what you suggest. Meanwhile, please suggest a program to replace splint because I don't think anyone ported lint to MacOS. That OS doesn't even...
RStanley, thank you. I tried to use unsigned integers because they can't be negative. Nothing in my program could produce a negative number. But I like my data types to be the best ones for what I...
Everyone, do I need to correct the program because splint printed these messages?
plicitly temp storage numbers returned as implicitly only:
numbers
Temp storage (associated...
Here's part of strcat's manual page from MacOS.
The asterisks signify pointers.[/FONT][/COLOR]
It's a relief to hear that memory didn't leak. Since I know a leak can be dangerous, I asked you experts about it.
Sadly, there's no Macport of valgrind.
I'll initialize variables from now on.
Thank you for the excellent points. aghast. I know that in C, array indexing begins at zero. So I should have considered that when writing the "between" function. Lately, I'm programming in Racket,...
Everyone,
I wrote this trivial program in minutes to see how well it would come out. I produces the correct answers. But I don't know how to plug the memory leak Splint found. Would you please...
Thank you. I should have noticed the typo and corrected it.
Here's a more concise loop condition
while (strrchr("YN", topper(c)) == NULL)
After topper returns c''s value in uppercase, strrchr looks for the uppercase letter in "YN". If it's not there,...
Instead of stopping the loop with the break statement, why not replace "while (1)" with "while (digit != ' ')"?
By the way, everyone, I put the program on my floor and squashed the bugs with my wheelchair. :)
Aghast,
Thank you for your detailed reply, especially for how to improve readability. Since my computer indented the program with GNU indent, I hope that program will make my machine to do what...
John.c,
Thank you for finding my mistakes.
Your computer prompted you at the wrong time because I called gets in a while condition when the function belonged instead in the loop's body. I'll...
Everyone,
Since I'm not a C expert, please criticize this program. I emailed to a friend fluent in that language. So, he said "Nice!" and told me how optimize the program slightly by replacing a...
That's a frightening thought for me because I adore a Unix coomand-line. :) Seriously, I do prefer a command-line and I've never tried to design a GUI. So I suspect writing a Microsoft GUI will be...
I hadn't thought about that, Salem. But I'm sure the program would work properly on any plaform where the user needs to read plain ASCII text. You may already know that I'm a Unix guy who runs...
To help dyslexics read a document on their computer screens, I'm writing a program to isolate words and phrases in a moveable, resizeable rectangle to make the letters stay put. Should I use the...
Laserlight, thank you for pointing out my mistake. I should have declared the array as constant and found another way to stop the loop. Before writing the function, I should have thought carefully,...
If the array had been const, I couldn't have added an element to it. I know I assumed the array had room for terminator, the second instance of the target. I haven't tried to run that function. ...
I know that, but I wonder purpose the terminator serves when there's already a way to tell whether you've reached the end of the list that the array stores. Why does the teacher want the students to...
Hi, I'm Bill, a new member and a Unix guy.
I don't know why you need the terminator when you know how many numbers are in the array. Would you ever need to count numbers like this, say?
...