Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > C Programming > conventional core of C

Reply
Thread Tools

conventional core of C

 
 
Ralph Malph
Guest
Posts: n/a
 
      06-21-2010
On 6/21/2010 11:27 AM, Bill Cunningham wrote:
> 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?

 
Reply With Quote
 
 
 
 
Keith Thompson
Guest
Posts: n/a
 
      06-21-2010
"Bill Cunningham" <(E-Mail Removed)> writes:
> Keith Thompson wrote:
>> 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.


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.

--
Keith Thompson (The_Other_Keith) http://www.velocityreviews.com/forums/(E-Mail Removed) <http://www.ghoti.net/~kst>
Nokia
"We must do something. This is something. Therefore, we must do this."
-- Antony Jay and Jonathan Lynn, "Yes Minister"
 
Reply With Quote
 
 
 
 
osmium
Guest
Posts: n/a
 
      06-21-2010
"Keith Thompson" wrote:

> "Bill Cunningham" <(E-Mail Removed)> writes:
>> Keith Thompson wrote:
>>> 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.

>
> 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.


 
Reply With Quote
 
Tom St Denis
Guest
Posts: n/a
 
      06-21-2010
On Jun 20, 12:13*pm, "Bill Cunningham" <(E-Mail Removed)> wrote:
> * * 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
 
Reply With Quote
 
Keith Thompson
Guest
Posts: n/a
 
      06-21-2010
"osmium" <(E-Mail Removed)> writes:
> "Keith Thompson" wrote:
>> "Bill Cunningham" <(E-Mail Removed)> writes:
>>> Keith Thompson wrote:
>>>> 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.

>>
>> 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.


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.

--
Keith Thompson (The_Other_Keith) (E-Mail Removed) <http://www.ghoti.net/~kst>
Nokia
"We must do something. This is something. Therefore, we must do this."
-- Antony Jay and Jonathan Lynn, "Yes Minister"
 
Reply With Quote
 
Joachim Schmitz
Guest
Posts: n/a
 
      06-21-2010
Keith Thompson wrote:
> "osmium" <(E-Mail Removed)> writes:
>> "Keith Thompson" wrote:
>>> "Bill Cunningham" <(E-Mail Removed)> writes:
>>>> Keith Thompson wrote:
>>>>> 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.
>>>
>>> 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.

>
> 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

 
Reply With Quote
 
Bill Cunningham
Guest
Posts: n/a
 
      06-21-2010
Keith Thompson wrote:

> 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


 
Reply With Quote
 
Bill Cunningham
Guest
Posts: n/a
 
      06-21-2010
Ralph Malph wrote:

> 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


 
Reply With Quote
 
Nick Keighley
Guest
Posts: n/a
 
      06-22-2010
On 21 June, 20:13, "Bill Cunningham" <(E-Mail Removed)> wrote:
> Ralph Malph wrote:


> > 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?


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()?
 
Reply With Quote
 
Nick Keighley
Guest
Posts: n/a
 
      06-22-2010
On 21 June, 18:24, Tom St Denis <(E-Mail Removed)> wrote:
> On Jun 20, 12:13*pm, "Bill Cunningham" <(E-Mail Removed)> wrote:


> > * * 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...



--

"Have I discovered what consiousness is yet?
Not at all, but I'm getting more deeply perplexed."
-- Susan Blackmore
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Core Solo & Core Duo are not Core microarchitecture; 65nm Pentium M chips bigal Hardware 0 03-22-2006 11:24 AM
Getting the word to conventional programmers Cameron Laird Python 12 03-24-2005 01:08 AM
ASP.NET with conventional technologies Mark Goldin ASP .Net 2 01-17-2004 11:57 PM
dslr's & conventional close-up lenses Thomas Blouin Digital Photography 4 12-02-2003 01:32 AM
Which is faster - USB-enabled Lexar card with Jumpshot, or conventional USB2 card reader? Alan F Cross Digital Photography 4 07-15-2003 08:52 PM



Advertisments