Does C++ raealy exists !

R

Robert Bralic

Jonathan Turkanis said:
Robert Bralic said:
CAN anybody tell me any address where I can download some small(1000-2000)
lines C++ proghram source.
Or send me ,a small(1000-2000) lines C++ program source that I can compille
with gpp under Linux Suse 7.1.
I can't belive that C++ exists.

I'm working on a proof that C++ exists, but so far it does not include
namespaces, multiple inheritance or partial ordering of function
templates. I'll let you know when it is finished.

For now, I have managed to prove that the basic "Hello, World!"
program exists (see Fig 1., below), so feel free to use it. It is just
a sketch, but you should be able to fill in the missing pieces.

Jonathan

----

Figure 1. A Hello World Program

[ preprocessor directives shown to exist in Lemma 5.13]

int main()
{
[ Result of substituting "Hello World!" for alpha in
Corollary 6.8 ]
} [ newline character (See Theorems 5.1-7) ]

Noubody sended mee a small progrma in C++ or Delphi of you,
so I have a heap of mails to read from honesty people that knows that
Delphi and C++ doesent work !
Godbye ,Robert !
 
T

Thomas Matthews

Robert said:
so I have a heap of mails to read from honesty people that knows that
Delphi and C++ doesent work !
Godbye ,Robert !

I really don't understand. Please expand your definition
of "Delphi and C++ doesn't work!".

Anybody can write a _program_ in a language that doesn't
fulfill its requirements. For example, the following
program is required to print the number 5:
#include <iostream>
#include <cstdlib>

int main(void)
{
std::cout << 7 << std::endl;
return EXIT_SUCCESS;
}

The above program translates fine, but produces the
wrong behavior, it doesn't "work".

In another example below, the program is required
to print the word "rain":
#include <iostream>
#include <cstdlib>

int main(void)
{
rain; // Syntax error, "rain" is not defined.
return EXIT_SUCCESS;
}

The above _program_ does not work because it
fails the translation phase due to a identifier
that is not defined.

The _language_ may not _work_ for applications
that it was not designed for. For example, a
hammer does not work for flipping a pancake,
it was not designed for that purpose. The
_standard_ C++ does not work for creating graphical
windows or turning on the segments of a Hex
Display. However, the language allows for
non-standard "extensions". So it can be adapted
to "work" for many situations.

Because someone has not fulfilled your request
for a 1000-2000 line program has no indication
whether the language "works". Also, the size
of a program has no indication whether a language
"works" or not. See the above examples of small
programs.

And then there is always the issue of how you
define a "line" of a program. Can I send you
1000 lines of comments? Can I send you a program
where large functions are only one a huge (100
character) line? Would you prefer an obfuscated
one? Search the web for "programming metrics".

How did you come up with the range of 1000 to
2000 lines?

In this newsgroup, we like to see definitions and
facts and explanations. Additional background
information (such as why you need this information)
is a bonus.

So do you say a hammer doesn't work if you are
using it like a kite? or an airplane?

--
Thomas Matthews

C++ newsgroup welcome message:
http://www.slack.net/~shiva/welcome.txt
C++ Faq: http://www.parashift.com/c++-faq-lite
C Faq: http://www.eskimo.com/~scs/c-faq/top.html
alt.comp.lang.learn.c-c++ faq:
http://www.comeaucomputing.com/learn/faq/
Other sites:
http://www.josuttis.com -- C++ STL Library book
http://www.sgi.com/tech/stl -- Standard Template Library
 

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,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top