Liste des Groupes | Revenir à col misc |
All OO languages are in fact procedural.I need to do some reading. My understanding of the difference is clouded by the fact that a subroutine is a procedure, but becomes a function if it delivers a return value. (Yes I am that old).
The opposite of “procedural” is “functional”, not “OO”.
So what syntax *do* you want to use to join strings?S3 = string_join(S1, S2) .. or .. S3 = S1.S2 .. or even S1 .= S2
I found that out in JavaScript where a comparison between a string "1"
and a number 1 failed on IE but worked on Firefox.
That’s a misfeature of JavaScript, not a fault of OO generally. ForYeah, I like PERL a whole lot better than JavaScript. PERL has different operators for string compare and numeric compare. So if $S1 is "1" and $I1 is the number 1, you can test $I1 == $S1 (which casts the numeric string into a number) or $I1 eq $S1 (which casts the string into a number). If $S1 = " 1", the numeric compare is true, but the string compare fails.
example, Python doesn’t have that misfeature. And neither does C++, while
we’re at it
Les messages affichés proviennent d'usenet.