Recommend any online references for abstract data types in C programming??

M

Mars

I searched and found quite many,
but (nearly) all are about C++.......

Any recommendation for such reference for pure C????

Thx~~~~


Mars.
 
D

DHOLLINGSWORTH2

If you want to stay Seriously up to date.
Check out IEEE, any transactions on software methods.
 
J

jacob navia

Keith said:
Is that a "pure C" tutorial, or does it also cover the extensions
implemented by lcc-win32? If the latter, does it clearly distinguish
between the standard language and the extensions?

All extensions are presented as extensions. They are summarized in the
grammar under "Extensions of lcc-win32" (page 41). They are explained
in page 156 ("Advanced programming with lcc-win32") :
> Lcc-win32 offers several extensions to the C language described
below. > This extensions are not part of the C standard.

Etc. I have clearly marked all extensions as what they are.

jacob
 
R

Randy Howard

You can download a tutorial for C from

The question was about ABSTRACT DATA TYPES IN C, not "where can
I find a C (or variant thereof) compiler".

"C Interfaces and Implementations" by Hanson actually covers
the topic that is the subject of this thread.

Algorithms in C (Sedgewick) also covers this.

A quickly google also turned up the following (I haven't read
them through, so YMMV)

http://www.csd.uwo.ca/~jamie/C/encapsulatedC.html
http://www.soe.ucsc.edu/classes/cmps101/Fall01/Locker/c-adt.pdf
http://portal.acm.org/citation.cfm?id=78883.78885
 
J

jacob navia

Randy said:
The question was about ABSTRACT DATA TYPES IN C, not "where can
I find a C (or variant thereof) compiler".

"C Interfaces and Implementations" by Hanson actually covers
the topic that is the subject of this thread.

Algorithms in C (Sedgewick) also covers this.

A quickly google also turned up the following (I haven't read
them through, so YMMV)

http://www.csd.uwo.ca/~jamie/C/encapsulatedC.html
http://www.soe.ucsc.edu/classes/cmps101/Fall01/Locker/c-adt.pdf
http://portal.acm.org/citation.cfm?id=78883.78885

I cover in the tutorial lists, hash tables, and other
abstract data types.
Sure, your references are much better, no questions about it.
 
F

Flash Gordon

jacob said:
All extensions are presented as extensions. They are summarized in the
grammar under "Extensions of lcc-win32" (page 41). They are explained
in page 156 ("Advanced programming with lcc-win32") :
below. > This extensions are not part of the C standard.

Etc. I have clearly marked all extensions as what they are.

You don't clearly mark all C99 features, such as declaring variables in
a for loop, which would be useful. Nor do you point out that C99
compilers are few and far between, an important issue for people to
understand.

You use exit(1) which is not portable, and you say it returns an error
code of 1 which is definitely not part of the standard (on VMS it would
be a success code). Why not use use EXIT_FAILURE especially when you
only have one "failure" code being returned by the program?

You introduce the defines WIN32 and WINVER which are in the USER name space.

You introduce structured exception handling using __try etc without
mentioning that they are an extension, something even MS mention.

In section 1.11.6 you have a typo "array[345] = array{123]+897;" should
obviously have a "[" instead of a "{". Everyone makes typos, so I point
it out to help rather than anything else.

In section 1.11.20 you don't mention that stdcall is an extention,
although you did mention it earlier. It would help if you called the
section something line "1.11.20 stdcall - Windows extension". Similar
comments apply else where. Remember, people often don't follow tutorials
linearly, and definitely won't always remember that you mentioned a few
chapters ago that something was an extension.

In your examples you use names starting with an _ which is not a good
idea since you can't expect someone new to C to cope with when a name
starting with an _ can be used and when it can't. I've not checked if
your usage is valid, since I can't be bothered to remember the exact
rules and just avoid starting names with an _.

Of course, it's your document and you are free to ignore these comments,
but they are intended to help you make it a *better* tutorial.
 
R

Ross A. Finlayson

jacob said:
I cover in the tutorial lists, hash tables, and other
abstract data types.
Sure, your references are much better, no questions about it.

Dear Jacob,

lcc-win32 is awesome. Back in the day, it was the _only_ free win32
compiler. Besides opinion about Microsoft, it's widely deployed and
tools to effectively deal with it are in high demand. There was cygwin
with mingw232, djgpp with rsxntdj, but your lcc-win32 was, and is, a
vital tool for many. The Win32 help files were available from Russia.
Visual C++ professional starts at $200, which is not much scratch for a
busy developer, that's what I use today on Windows, it's an actually
very good development environment, I've come to prefer OSX's tools
because OSX is so much easier on the eyes. Boundschecker costs 695, I
tried it, UNIX tools, can, should, and do range on out from free. I
highly recommend Win32 Programming by Rector and Newcomer, and name
your files .rc2 and they'll be resource compiler files but not load in
the resource editor, instead in the text editor, and the most critical
aspect of the window class is the user data pointer. Doxygen is free,
recommended, and can be an integral part of the design/code/review
cycle, and there many excellent code visualization tools. gcc is damn
near ubiquitous.

http://www.chris-lott.org/resources/cmetrics/

I saw that from Ganssle's web page, that guy's funny as hell.

Today programming Win32, in C, is much more accessible, in no large
part due to your software. Are or were you a Microsoft employee, or
were the original authors of the prototype compiler software?

Abstract Data Types? Pass a pointer to your process, base, or global
ADT to every function you call so there are no global variables, it can
be thread-safe (reentrant), stored in the user data pointer, and stuff.

Thank you very much.

Ross F.
 
J

jacob navia

Flash Gordon wrote:
[snip]
>
You don't clearly mark all C99 features, such as declaring variables in
a for loop, which would be useful. Nor do you point out that C99
compilers are few and far between, an important issue for people to
understand.

You use exit(1) which is not portable, and you say it returns an error
code of 1 which is definitely not part of the standard (on VMS it would
be a success code). Why not use use EXIT_FAILURE especially when you
only have one "failure" code being returned by the program?

True. I will correct that.
You introduce the defines WIN32 and WINVER which are in the USER name
space.

Many programs rely on WIN32 being defined. Microsoft used that in very
early versions (windows 95) then corrected that to _WIN32.

WINVER is introduced by Microsoft in all their windows header files.
I can't change that.
You introduce structured exception handling using __try etc without
mentioning that they are an extension, something even MS mention.

Yes. This will be corrected. Thanks.
In section 1.11.6 you have a typo "array[345] = array{123]+897;" should
obviously have a "[" instead of a "{". Everyone makes typos, so I point
it out to help rather than anything else.

OK.

In section 1.11.20 you don't mention that stdcall is an extention,
although you did mention it earlier. It would help if you called the
section something line "1.11.20 stdcall - Windows extension". Similar
comments apply else where. Remember, people often don't follow tutorials
linearly, and definitely won't always remember that you mentioned a few
chapters ago that something was an extension.

I will add that.
In your examples you use names starting with an _ which is not a good
idea since you can't expect someone new to C to cope with when a name
starting with an _ can be used and when it can't. I've not checked if
your usage is valid, since I can't be bothered to remember the exact
rules and just avoid starting names with an _.

Of course, it's your document and you are free to ignore these comments,
but they are intended to help you make it a *better* tutorial.


Thanks for your comments. I will fix those.
 
F

Flash Gordon

jacob said:
Flash Gordon wrote:


Many programs rely on WIN32 being defined. Microsoft used that in very
early versions (windows 95) then corrected that to _WIN32.

WINVER is introduced by Microsoft in all their windows header files.
I can't change that.

If they are defined in Windows specific headers, and you point this out,
then that is fine. You (and MS, and GNU and everyone else) can define
whatever you want in your own system specific headers. However, the
implication of the way your wrote that part is that they are defined
even if you don't include any headers.

Thanks for your comments. I will fix those.

No problem. I've only scanned it, not done a proper review.
 
C

CBFalconer

Flash said:
If they are defined in Windows specific headers, and you point this
out, then that is fine. You (and MS, and GNU and everyone else) can
define whatever you want in your own system specific headers.
However, the implication of the way your wrote that part is that
they are defined even if you don't include any headers.



No problem. I've only scanned it, not done a proper review.

Now this is an exchange that is worthwhile and improves the breed.
It is even on-topic. :)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top