S
spinoza1111
Oops. The clear answer is Visual Basic.
Well, that's *a* clear answer, at least. And it's the answer I think
the test setter probably intended. But Perl is another clear answer.
Just for fun, here's a Perl program I found on the Web:
''=~( '(?{' .('`' |'%') .('[' ^'-')
.('`' |'!') .('`' |',') .'"'. '\\$'
.'==' .('[' ^'+') .('`' |'/') .('['
^'+') .'||' .(';' &'=') .(';' &'=')
.';-' .'-'. '\\$' .'=;' .('[' ^'(')
.('[' ^'.') .('`' |'"') .('!' ^'+')
.'_\\{' .'(\\$' .';=('. '\\$=|' ."\|".( '`'^'.'
).(('`')| '/').').' .'\\"'.+( '{'^'['). ('`'|'"') .('`'|'/'
).('['^'/') .('['^'/'). ('`'|',').( '`'|('%')). '\\".\\"'.( '['^('(')).
'\\"'.('['^ '#').'!!--' .'\\$=.\\"' .('{'^'['). ('`'|'/').( '`'|"\&").(
'{'^"\[").( '`'|"\"").( '`'|"\%").( '`'|"\%").( '['^(')')).. '\\").\\"'.
('{'^'[').( '`'|"\/").( '`'|"\.").( '{'^"\[").( '['^"\/").( '`'|"\(").(
'`'|"\%").( '{'^"\[").( '['^"\,").( '`'|"\!").( '`'|"\,").( '`'|(',')).
'\\"\\}'.+( '['^"\+").( '['^"\)").( '`'|"\)").( '`'|"\.").( '['^('/')).
'+_,\\",'.( '{'^('[')). ('\\$;!').( '!'^"\+").( '{'^"\/").( '`'|"\!").(
'`'|"\+").( '`'|"\%").( '{'^"\[").( '`'|"\/").( '`'|"\.").( '`'|"\%").(
'{'^"\[").( '`'|"\$").( '`'|"\/").( '['^"\,").( '`'|('.')).. ','.(('{')^
'[').("\["^ '+').("\`"| '!').("\["^ '(').("\["^ '(').("\{"^ '[').("\`"|
')').("\["^ '/').("\{"^ '[').("\`"| '!').("\["^ ')').("\`"| '/').("\["^
'.').("\`"| '.').("\`"| '$')."\,".( '!'^('+')). '\\",_,\\"' .'!'.("\!"^
'+').("\!"^ '+').'\\"'. ('['^',').( '`'|"\(").( '`'|"\)").( '`'|"\,").(
'`'|('%')). '++\\$="})' );$:=('.')^ '~';$~='@'| '(';$^=')'^ '[';$/='`';
which is perhaps reminiscent of some IOCCC entries! But here's a more typical
Perl program (which does the same thing as the above):
use Acme::EyeDrops qw(sightly get_eye_string hjoin_shapes);
my $ninety_nine = <<'BURP';
$==pop||99;--$=;sub
_{($;=($=||No)." bottle"."s"x!!--$=." of beer")." on the wall"}
print+_,", $;!
Take one down, pass it around,
",_,"!
"while++$=
BURP
chop($ninety_nine); $ninety_nine =~ s/\nprint/print/;
print sightly( { Regex => 1,
Compact => 1,
ShapeString => hjoin_shapes(2,
(get_eye_string('bottle2'))x6),
SourceString => $ninety_nine } );
And this is nothing like C's syntax. So Perl is also a clear answer.
All the others have a VERY
IMPORTANT feature, and this is explicit block structure.
VB uses block structure to some extent as well. As for Perl, it doesn't even
enclose the entry code in an explicit block!
Use your common sense and test-taking knowledge. Reason that in this
question, the narrower definition of C (which prohibits // comments,
as Heathfield reminded me) is meant.
I reminded you of no such thing. C does not prohibit // comments.
C90 requires the implementation to issue a diagnostic message if
the program contains any syntax errors, and // "comments" would
normally mean a syntax error - but the implementation is allowed
to accept them provided it issues that message. Furthermore, as
of C99 // comments have been codified as part of C.
If you can't deal with ambiguity, don't talk to end users.
If you don't know the language (and it is clear that you don't
know it very well), don't presume to make judgements about it.
I will so presume. This is because the language is just a bunch of
rather foolish decisions made in 1970 and compounded by unethical
decisions made in 1999. Your stunted personality and inability to
communicate even your valid points are evidence of what this
"knowledge" can do to a person.
There's something wrong going on if knowledge of a programming
language is correlated with high regard for a programming language.
The two "variables" should be independent. When they are not, this
means that the learning of the language has been zero-sum in the sense
that the programmer is loyal to the language because his knowledge has
been reduced to knowing-how, to do things in his favorite language.
The above program exhibits undefined behaviour because it calls a
variadic function without a valid prototype in scope, so only a
fool would draw conclusions about the language from that program.
You can't even tell the difference between a code example and working
code. Of course, the code works. I copied it from a program which had
stdio. You know that, and you are being PROFOUNDLY dishonest.
If I add the appropriate header and run the program on my
system, I get the following output:
me@here> ./foo
Goodbye, cruel worldme@here>
which is almost certainly not what was intended.
Then, you're incompetent, since it's incumbent on you to adapt the
program to your perverted environment.
We've been over this ground repeatedly. You constantly pretend to be
even dumber than you are in order to make more intelligent people look
stupid, and that's a classic yob trick. Most people see through this.
I think you'd be more successful in life if you stopped.
I saw "goodbye, cruel world" WITHOUT any extra characters, because I
run C from inside Microsoft C++ Express, a better development
platform, probably, than yours. I put a break right after the printf
and saw only "good-bye cruel world" on an otherwise black MS-DOS style
screen, and this is what I wanted. There are countless applications
where you DON'T want a carriage return/line feed or line feed.
No, it's based on the fact that #include is a preprocessor directive,
and anyone who presumes to set a test on C ought to be aware of this
fairly basic piece of information.
You constantly make global, and globally uncharitable, inferences
about people's understanding based on differential modes of
expression. You come, it's clear to me, from a lower middle class
abusive family environment where kids get slapped around if they talk
out of turn, in which Job One is hustling to please teachers and the
boss by never talking out of turn. It's Dickensian, and it makes me
puke.
You can sabotage an expression of knowledge, but you cannot yourself
communicate your knowledge.
People have a right to express their understanding of C in different
ways. Trivially, they have the right to use their own native language.
In the context of a discussion of preprocessor directives, in a group
effort such as a structured walkthrough or extreme programming, only a
nasty little CREEP goes around correcting usage save when the usage
corrected hides an important distinction.
Take your being right about call by value. You never thought to
explain properly the mechanism that accounts for the fact that all
values are on the stack when a procedure starts, and the fact that
there's no way of delaying evaluation. In fact, you made one of your
famous unfalsifiable negative claims: that gee it might be possible to
implement C without stacks.
You have "learned" C but you've forgotten how to write English, if
indeed you ever learned, and you have no business posting here
whatsoever. Go and implement C runtime without stacks, or something.
He's right on both counts.
I don't know of any experienced C programmer who does so.
Then you need to get out more.
True precision, however, is one - not the only, by any means, but
*one* - indicator of expertise.
True to what? C is not a thing, it's a form of life and a set of
social practices, some of which are deviant.
The criticisms of Herbert Schildt's code are the direct result of
Herbert Schildt's code being riddled with errors. Errors are of
course unavoidable, but he would be well advised to acknowledge
them via a comprehensive errata site.
As for Jacob Navia, he tends to interpret disagreement as
attack, so it's not surprising if he feels attacked. Nevertheless,
people have a right to disagree.
I saw the filth you posted about him. Unlike a lot of the cowards
here, he fought back.
No, it means that C is portable even to machines with a
fixed entry symbol.
No, many options are a sign of flexibility.
Unlearn that. Many options merely increase the space of possible
programs, and under the programming variant of Gresham's Law (99% of
everything is fucked), many options merely increase the probability of
errors.