conventional core of C

B

Bill Cunningham

Why after chaper one of kandr2 does it say that the "...conventional
core of C" has been covered? You have the rest of the book and functions to
learn.

Bill
 
M

Malcolm McLean

    Why after chaper one of kandr2 does it say that the "...conventional
core of C" has been covered? You have the rest of the book and functions to
learn.
The C language isn't the same as the standard library. Many C programs
don't use the standard library at all. You can also write most of the
standard library in C. Try writing your own strlen() for example.
 
B

Bill Cunningham

The C language isn't the same as the standard library. Many C programs
don't use the standard library at all. You can also write most of the
standard library in C. Try writing your own strlen() for example.

That is sure an encouraging thing.

Bill
 
V

Vincenzo Mercuri

Il 20/06/2010 22.27, Bill Cunningham ha scritto:
But what about struct? It's mentioned in the last chapters and I don't
know how one would just with the "C language" to right their own struct.

Bill

I don't see any contradictions between the words 'conventional core'
and the content of Chapter 1. Maybe it depends on what you pretend
the 'conventional core' be. I think that the first five lines of Chapter
1 clearly explain what the intents of this brief introduction are.
 
B

Bill Cunningham

Malcolm said:
The C language isn't the same as the standard library. Many C programs
don't use the standard library at all. You can also write most of the
standard library in C. Try writing your own strlen() for example.

But what about struct? It's mentioned in the last chapters and I don't
know how one would just with the "C language" to right their own struct.

Bill
 
K

Keith Thompson

Bill Cunningham said:
The C language isn't the same as the standard library. Many C programs
don't use the standard library at all. You can also write most of the
standard library in C. Try writing your own strlen() for example.

That is sure an encouraging thing.

Bill, I thought you were going to stop using Outlook Express --
either that, or figure out some way to make it quote properly.
 
K

Kenny McCormack

Keith Thompson said:
Bill, I thought you were going to stop using Outlook Express --
either that, or figure out some way to make it quote properly.

Are you ever going to get tired of beating that dead horse?

--
(This discussion group is about C, ...)

Wrong. It is only OCCASIONALLY a discussion group
about C; mostly, like most "discussion" groups, it is
off-topic Rorsharch [sic] revelations of the childhood
traumas of the participants...
 
M

Malcolm McLean

    But what about struct? It's mentioned in the last chapters and I don't
know how one would just with the "C language" to right their own struct.
If struct is excluded from the "conventional core" I've obviously
misunderstood the term.

(structs were added late to C, originally each member was in global
namespace, so you couldn't have two structs pointi{int x, int y} and
pointf{float x; float y;}, or the x and y would collide.
 
B

Bill Cunningham

Keith said:
Bill, I thought you were going to stop using Outlook Express --
either that, or figure out some way to make it quote properly.

I am using quote fix right now.

Bill
 
B

Bill Cunningham

Malcolm McLean wrote:

[snip]

Try writing your own strlen() for example.

Hum. That might be a little harder than I could tackle. But I see your
point. I would begin by using a char or int like this.

char q='"';

Count everything between and including the " stored in q. That would be
what I would call a string. I don't use strlen() much but I know what it
does.

Bill
 
R

Ralph Malph

Malcolm McLean wrote:

[snip]

Try writing your own strlen() for example.

Hum. That might be a little harder than I could tackle. But I see your
point. I would begin by using a char or int like this.

char q='"';

Count everything between and including the " stored in q. That would be
what I would call a string. I don't use strlen() much but I know what it
does.
strlen() isn't that hard, man. a C string is just an array of
characters terminated by '\0'.
Take a pointer to the first element and increment a counter(and the
pointer) until you point to '\0'.
char q='"' is not a C string
but
char* q="\"\0"; is a C string.
Do you see why?
 
K

Keith Thompson

Bill Cunningham said:
I am using quote fix right now.

So what? I see that, in some but not all of your articles, quoted
text is not properly marked. Using quote fix with Outlook Express
obviously does not solve that problem. Using Thunderbird, which
you've done in the past, does.

My advice: Never use Outlook Express again.
 
O

osmium

Keith Thompson said:
So what? I see that, in some but not all of your articles, quoted
text is not properly marked. Using quote fix with Outlook Express
obviously does not solve that problem. Using Thunderbird, which
you've done in the past, does.

My advice: Never use Outlook Express again.

Just a wild guess, but in order for Quote fix to work you have to actually
use it. Note that Bill didn't say he always uses it. I have never had a
case where it didn't do what is claimed for it.

It has some annoying side effects so I don't usually use it unless I konw
that I need it. Namely it changes perfectly understandable (but usually
annoying) emoticons and Internet speak (LOL) to mystical icons, such as a
red 'X' in a little box.
 
T

Tom St Denis

    Why after chaper one of kandr2 does it say that the "...conventional
core of C" has been covered? You have the rest of the book and functions to
learn.

Bill

[granted your question is not genuine since you're a troll I'll answer
just the same since hopefully it will benefit someone else...]


There is no hard an fast definition as to what "conventional core"
actually means. I think loosely [having just skimmed to the paragraph
in question and looking at the TOC] it looks like he means that you
now have seen enough C to write a really basic [and conforming]
application. Not that you have learned all the components of the
actual language [omitting the standard c lib].

The idea is to lay on the ground some disorganized pieces of
information to engage the reader [e.g. they can very quickly be
writing really trivial applications] so as to make the learning
process more practical than theoretical. You see that they briefly
cover "if" while chapter three is entirely dedicated to flow control
[including 'if']. Similarly for 'while' and 'for'. It means that
they can talk about arrays [for instance] and use 'for' without
totally baffling the reader.

Aside from a few non-ISOisms (e.g. "main()") the book isn't a bad read
for anyone who hasn't seen C before. You have to actually read the
entire book though, not just skim through chapter one and then start
asking questions like you have legitimately tried to study the
subject...

Tom
 
K

Keith Thompson

osmium said:
Just a wild guess, but in order for Quote fix to work you have to actually
use it. Note that Bill didn't say he always uses it. I have never had a
case where it didn't do what is claimed for it.

It has some annoying side effects so I don't usually use it unless I konw
that I need it. Namely it changes perfectly understandable (but usually
annoying) emoticons and Internet speak (LOL) to mystical icons, such as a
red 'X' in a little box.

Ok. I don't use Outlook Express, and I don't know how Quote Fix works.
I assumed, apparently incorrectly, that it was merely an add-on
(plugin?) for OE that would cause it to process quoted text correctly
without further user intervention.

In any case, my advice to Bill stands.
 
J

Joachim Schmitz

Keith said:
Ok. I don't use Outlook Express, and I don't know how Quote Fix
works. I assumed, apparently incorrectly, that it was merely an add-on
(plugin?) for OE that would cause it to process quoted text correctly
without further user intervention.

It is more a wrapper than a plugin. So you can still start Outlook Express
without OEQuoteFix.
This seems what Bill is doing frequently.

Bye, Jojo
 
B

Bill Cunningham

Keith said:
So what? I see that, in some but not all of your articles, quoted
text is not properly marked. Using quote fix with Outlook Express
obviously does not solve that problem. Using Thunderbird, which
you've done in the past, does.

My advice: Never use Outlook Express again.

The thing is thunderbird is pretty complicacted to work with. It's a bit
annoying to cleaning up posts. I can download posts with OE and with
thunderbird once they're downloaded I can't clean them up anyway. Any good
suggestions for linux machines?

Bill
 
B

Bill Cunningham

Ralph said:
strlen() isn't that hard, man. a C string is just an array of
characters terminated by '\0'.
Take a pointer to the first element and increment a counter(and the
pointer) until you point to '\0'.
char q='"' is not a C string
but
char* q="\"\0"; is a C string.
Do you see why?

Oh yeah C sticks that \0 at the end of every string. And that's just how
strlen() works too.

Bill
 
N

Nick Keighley

Ralph Malph wrote:

so is
char* q="\"";

why did you explicitly terminate the string. It just confuses bill,
and that's like dynamiting fish in a barrel

    Oh yeah C sticks that \0 at the end of every string. And that's just how
strlen() works too.


strlen() doesn't add a \0 at the end of a string. So can you write
strlen()?
 
N

Nick Keighley

    Why after chaper one of kandr2 does it say that the "...conventional
core of C" has been covered? You have the rest of the book and functions to
learn.

[granted your question is not genuine since you're a troll I'll answer
just the same since hopefully it will benefit someone else...]

now you're just being racist against norwegians
There is no hard an fast definition as to what "conventional core"
actually means.  I think loosely [having just skimmed to the paragraph
in question and looking at the TOC] it looks like he means that you
now have seen enough C to write a really basic [and conforming]
application.  Not that you have learned all the components of the
actual language [omitting the standard c lib].
yes

The idea is to lay on the ground some disorganized pieces of
information to engage the reader [e.g. they can very quickly be
writing really trivial applications] so as to make the learning
process more practical than theoretical.

I don't see it that way. I think it's a "bootstrap" problem. There's a
mutual recursion problem with computer languages. In order to
understand X you need to understand A and B. And to undertsand A you
need X and Y. And so on. Chapter 1 gives you a quick overview of the
language which enables you to bootstrap the rest. I remember being
very impressed with K&R partly because of this.
 You see that they briefly
cover "if" while chapter three is entirely dedicated to flow control
[including 'if'].  Similarly for 'while' and 'for'.  It means that
they can talk about arrays [for instance] and use 'for' without
totally baffling the reader.

Aside from a few non-ISOisms (e.g. "main()") the book isn't a bad read
for anyone who hasn't seen C before.  You have to actually read the
entire book though, not just skim through chapter one and then start
asking questions like you have legitimately tried to study the
subject...
 

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

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,581
Members
45,056
Latest member
GlycogenSupporthealth

Latest Threads

Top