Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > C Programming > need information on the following items

Reply
Thread Tools

need information on the following items

 
 
Randy Howard
Guest
Posts: n/a
 
      01-03-2006
pemo wrote
(in article <dpe4u0$c3b$(E-Mail Removed)>):

>
> "Christopher Benson-Manica" <(E-Mail Removed)> wrote in message
> news:dpdut0$br3$(E-Mail Removed)...
>> Eric Sosman <(E-Mail Removed)> wrote:
>>
>>> You've misspelled "virtuous." A virtuous function is one
>>> that has no side-effects; these are also called "pure" functions.

>>
>> I thought a "virtuous" function was one that behaved the way the
>> programmer intended.

>
> No, that's a 'lucky one'!


It depends. What the programmer "intends" can often be
incorrect, especially in the early stages, so following
intention (rather than what is really needed) might be unlucky
in such cases.


--
Randy Howard (2reply remove FOOBAR)
"The power of accurate observation is called cynicism by those
who have not got it." - George Bernard Shaw





 
Reply With Quote
 
 
 
 
Alastair
Guest
Posts: n/a
 
      01-04-2006
> >
> > I use the term "Virtual" function on C to mean a function pointer.

>
> I've never heard the term virtual function used to describe a function
> pointer in C. The correct terms for a function pointer, as far as I can
> tell are "function pointer" and "pointer to a function".


Yeah, well its basically a "slang" word in C - I have heard it used.
But I get the impression that Ranjee maybe looking for C++ definitions.

> > Don't have answers to the rest of the top of my head... sorry.

>
> Well, we tend to discourage doing peoples homework for them anyway,
> although helping when someone has made the effort is another matter.


Ok - I can see that this is a fairly unforgiving group! - but I'll go
with the locals rules.
Alastair

 
Reply With Quote
 
 
 
 
Randy Howard
Guest
Posts: n/a
 
      01-04-2006
Alastair wrote
(in article
<(E-Mail Removed) .com>):

>> Well, we tend to discourage doing peoples homework for them anyway,
>> although helping when someone has made the effort is another matter.

>
> Ok - I can see that this is a fairly unforgiving group! - but I'll go
> with the locals rules.
> Alastair


What is it that you find unforgiving about not doing someone
else's homework for them? You think people that want to get
grades based upon false pretenses are deserving of support and
admiration?

--
Randy Howard (2reply remove FOOBAR)
"The power of accurate observation is called cynicism by those
who have not got it." - George Bernard Shaw





 
Reply With Quote
 
Flash Gordon
Guest
Posts: n/a
 
      01-04-2006
Alastair wrote:
>>> I use the term "Virtual" function on C to mean a function pointer.

>> I've never heard the term virtual function used to describe a function
>> pointer in C. The correct terms for a function pointer, as far as I can
>> tell are "function pointer" and "pointer to a function".

>
> Yeah, well its basically a "slang" word in C - I have heard it used.


Different people come across different things. Personally I try to avoid
using terms I know have specific meanings in other languages, such as
virtual, unless saying something like, "you could implement something
like virtual functions using function pointers."

> But I get the impression that Ranjee maybe looking for C++ definitions.


Indeed.

>>> Don't have answers to the rest of the top of my head... sorry.

>> Well, we tend to discourage doing peoples homework for them anyway,
>> although helping when someone has made the effort is another matter.

>
> Ok - I can see that this is a fairly unforgiving group! - but I'll go
> with the locals rules.


Not a problem and it was not intended as an attack on you. It's just
that people won't learn by getting others to do their homework, and it
is also not fair on the people who actually do the work themselves if we
do the work for some people.
--
Flash Gordon
Living in interesting times.
Although my email address says spam, it is real and I read it.
 
Reply With Quote
 
Alastair
Guest
Posts: n/a
 
      01-04-2006
> >>> I use the term "Virtual" function on C to mean a function pointer.
> >> I've never heard the term virtual function used to describe a function
> >> pointer in C. The correct terms for a function pointer, as far as I can
> >> tell are "function pointer" and "pointer to a function".

> >
> > Yeah, well its basically a "slang" word in C - I have heard it used.

>
> Different people come across different things. Personally I try to avoid
> using terms I know have specific meanings in other languages, such as
> virtual, unless saying something like, "you could implement something
> like virtual functions using function pointers."


That's probably a good policy.

>
> >>> Don't have answers to the rest of the top of my head... sorry.
> >> Well, we tend to discourage doing peoples homework for them anyway,
> >> although helping when someone has made the effort is another matter.

> >
> > Ok - I can see that this is a fairly unforgiving group! - but I'll go
> > with the locals rules.

>
> Not a problem and it was not intended as an attack on you. It's just
> that people won't learn by getting others to do their homework, and it
> is also not fair on the people who actually do the work themselves if we
> do the work for some people.
> --


Ok, I'm sorry - I have been having a hard time since I started using
this whole newsgroup thing yesterday... I have just found that people
are a bit hard/sarcastic on you if you ask a "wrong" question! -
anyway... no problems here!

 
Reply With Quote
 
Flash Gordon
Guest
Posts: n/a
 
      01-04-2006
Alastair wrote:

Please leave in the attributions, the lines that tell us who said what,
such as the "Alastair wrote" line above.

<snip>

> Ok, I'm sorry - I have been having a hard time since I started using
> this whole newsgroup thing yesterday... I have just found that people
> are a bit hard/sarcastic on you if you ask a "wrong" question! -
> anyway... no problems here!


Yes, it can be hard so you need to develop a thick skin. However, most
of it is not meant personally, and some of it is just cultural
differences (what is considered acceptable or a joke in one country is
considered insulting somewhere else). However, if you can stand it then
there is a lot of expertise here that you (and I) can learn from.
--
Flash Gordon
Living in interesting times.
Although my email address says spam, it is real and I read it.
 
Reply With Quote
 
Keith Thompson
Guest
Posts: n/a
 
      01-04-2006
"Alastair" <(E-Mail Removed)> writes:
[snip]
> Ok, I'm sorry - I have been having a hard time since I started using
> this whole newsgroup thing yesterday... I have just found that people
> are a bit hard/sarcastic on you if you ask a "wrong" question! -
> anyway... no problems here!


Part of the problem is that we get a *lot* of off-topic questions
here. Many of them are unintentional, e.g., from people who assume
that anything relating to any C implementation is topical here. Too
many, though, are from trolls who know the conventions we've been
following here for many years, but insist on disrupting the newsgroup.

It's been suggested that we should expand the scope of the newsgroup
to include implementation-specific topics as long as they're related
to C. Our neighbors in comp.lang.c++ tried that some years ago, and
it almost destroyed the newsgroup.

The result is sometimes that an innocent newbie will sometimes get the
brunt of years of frustration. (The trolls find this all amusing for
some unfathomable reason.)

Be patient, don't take it personally, and ignore the trolls.
And welcome to the group.

--
Keith Thompson (The_Other_Keith) http://www.velocityreviews.com/forums/(E-Mail Removed) <http://www.ghoti.net/~kst>
San Diego Supercomputer Center <*> <http://users.sdsc.edu/~kst>
We must do something. This is something. Therefore, we must do this.
 
Reply With Quote
 
Dave Thompson
Guest
Posts: n/a
 
      01-11-2006
On Tue, 03 Jan 2006 08:09:05 -0500, Eric Sosman
<(E-Mail Removed)> wrote:
<snip mostly good DYODH>
> > 4) How can I call a c function in a c++ program and vice versa?

>
> Not possible, in either direction. All functions in
> a C program are C, so there are no C++ functions to call.


True.

> Similarly, a C++ program contains only C++ functions (some
> may look a lot like C, but if they reside in a C++ program
> the C++ rules prevail).
>

Not. C++ actually allows all three cases: C++ functions with C++
linkage, C++ functions with C linkage, and true C functions with C
linkage. It's still offtopic in clc, and I'd bet a FAQ in clc++.

- David.Thompson1 at worldnet.att.net
 
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
I AM BUYING ANY OF THE FOLLOWING CISCO ITEMS & LOTS MORE NOT LISTED Network/Software Buyer Cisco 0 12-24-2010 11:33 AM
The Web server reported the following error when attempting to create or open the Web project located at the following URL: 'http://localhost/822319ev1'. 'HTTP/1.1 500 Internal Server Error'. chanmm ASP .Net 2 09-07-2010 07:37 AM
Information Bank Every Information That U Need deshiportal Computer Security 0 06-02-2009 03:47 PM
I need Cisco Pix 506E code for the following items Marskarthik Cisco 5 07-10-2007 01:57 AM
RE: The Web server reported the following error when attempting to create or open the Web project located at the following URL: <URL> =?Utf-8?B?VHJldm9yIEJlbmVkaWN0IFI=?= ASP .Net 0 06-07-2004 07:36 AM



Advertisments