Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

C++ is awesome!

Name: Anonymous 2006-11-06 18:09

(a<b?a:b<c?b:c) = val();

Name: Anonymous 2007-07-18 4:59 ID:7uXIxOPr

>>35
Amerifag

Name: Anonymous 2007-07-18 5:51 ID:Heaven

>>39
no a char is a byte.
A char might be a 7bit byte, an 8bit byte even a 36bit byte, but it still would be a byte.

Name: Anonymous 2007-07-18 5:57 ID:mxcr/PD6

>>39,42
No. A char is at least 8 bits. A byte can be any number of bits.

Name: Anonymous 2007-07-18 6:26 ID:LsPuaK1X

You don't get any machines nowadays with a non-8-bit byte.

Name: Anonymous 2007-07-18 6:27 ID:Heaven

>>43
incorrect, if you want an 8bit object you have to use something like uint8_t etc.

a char is a byte.

Name: Anonymous 2007-07-18 6:35 ID:Heaven

>>42,43
Ah, I stand corrected. I think what the standard actually says, then, is that a char is at least 8 bits. Thanks for the clarification ;-)

Name: Anonymous 2007-07-18 6:48 ID:7uXIxOPr

But the standard is a piece of shit. Anything with a name resembling a character should be at fucking least 21 bits, and the ONLY character set which it should ever support should be ISO/10646 UCS. Then strings should be abstracted so you don't poke your nose (overriding [] as necessary) and they should use an implementation-defined Unicode Transformation Format out of the three possible UTF-8, UTF-16 and UTF-32, with full Unicode semantics as defined in Unicode 5.0 and no character set/encoding conversions AT FUCKING ALL. Then, when you want to read/write strings from/to a file/terminale/etc., you either use the Unicode Transformation Format used by the stream (one of UTF-8, UTF-16, or UTF-32, specified when creating it), or you can call the function __WARNING__SHIT_COMING_convert_character_set_yes_I_really_want_to_do_this_yes_I_know_I_shouldnt(str, other_legacy_goddamned_piece_of_shit_charset, FOR_REAL | YES_I_AM_A_MORON_FOR_NOT_USING_UNICODE). Of course, for binary files and sockets, you should use byte arrays, whose type should be byte or signed byte, and you'd have a function similar to the one I described for byte array to string conversion.

That's how things should be done. Anything that's not Unicode should be filtered through kill_this_shit(WITH_FIRE).

Name: Anonymous 2007-07-18 6:53 ID:IGKqSAxO

>>47

ENTERPRISE

Name: Anonymous 2007-07-18 7:00 ID:x4oldEir

Gotta love variable width character encodings

Name: Anonymous 2007-07-18 7:47 ID:Heaven

>>49
I like GSM 7bit encoding.

Name: Anonymous 2007-07-18 8:36 ID:+KT41DJE

>>39
Yes, a byte can be any number of bits.

Name: Anonymous 2007-07-18 8:41 ID:+KT41DJE

>>40
Yes, that was my point. Sigh...

BIG difference, one has to be deleted (new) the other is deleted when the block ends. I.e.


{
    char *foo = (char[52]){0,};
} /* allocated memory is deallocated. */

{
  char *foo = new char[52];
} /* allocated memory still exists. */


HENCE:

"when you can't be arsed deleting/freeing it after you've used it. (happens at the end of the scope)"

Name: Anonymous 2007-07-18 8:46 ID:+KT41DJE

>>47
tl;dr

Name: Anonymous 2007-07-18 8:49 ID:+KT41DJE

>>42
>>43
>>45
ITT noobs confuse C's definition of a byte (implementation specific) with an octet.

Btw an object of type char can hold one (implementation specific) byte.

Glad that's cleared up.

Name: Anonymous 2007-07-18 8:50 ID:i2QKQL/m

>>54
which means that a char is an implementation specific byte.
right?

Name: Anonymous 2007-07-18 9:13 ID:Heaven

>>45
An object declared as type char is large enough to store any member of the basic
execution character set.

a char must be at least 7 bits in c99, since you need at least 7 bits to represent all the characters that must be included in the basic execution character set.

regarding the size of a byte, wikipedia says:
historically, bytes have ranged from five to twelve bits. [citation needed]

Name: Anonymous 2007-07-18 9:51 ID:+KT41DJE

>>55
ja

Name: Anonymous 2007-07-18 10:04 ID:i2QKQL/m

>>57
well i'm >>45 so why are you calling me a n00b?
it's what i said.

a char is a byte
if you want an 8bit object use uint8_t

Name: Anonymous 2007-07-18 10:06 ID:oCpLpYvo

>>56
a char could be less than 7 bits if it was compressed.

Name: Anonymous 2007-07-18 10:06 ID:x4oldEir

I like using uint8_ts instead of chars

Name: Anonymous 2007-07-18 10:16 ID:Heaven

>>59
you can't represent all of the 100 characters that are required to be in the basic execution character set in less than 7 bits.

Name: Anonymous 2007-07-18 10:17 ID:oCpLpYvo

>>59 impossible GTFO.
However if you were using qubits then you could store a char in less than 7 bits.

>>69, 61 same person.

Name: Anonymous 2007-07-18 10:18 ID:Heaven

>>58
A byte can be any length.
A char must be at least 7 bits.

Name: Anonymous 2007-07-18 10:31 ID:i2QKQL/m

>>63
so >>57 is wrong?

Name: Anonymous 2007-07-18 15:42 ID:88NG7eVN

>>39
Nope. Section A7.4.8 (page 204) of the C Programming Language defines sizeof(char) to be 1.

Name: C FAG 2007-07-18 17:11 ID:ROniVmzU

>>1
Oh wow lol. *(a < b ? a : b < c ? b : c) = val(); works for me. Srsly, C++ has seriously gone overboard on the syntactic sugar. It's making code much more difficult to understand.

Name: C FAG 2007-07-18 17:13 ID:ROniVmzU

... of course that compares pointers. what the C++ version with the references does is actually *(*a < *b ? a : *b < *c ? b : c) = val(); which is parsed quite easily given a syntax-highlighting editor.

Name: Anonymous 2007-07-18 18:25 ID:+KT41DJE

An object declared as type char is large enough to store any member of the basic execution character set. If a member of the basic execution character set is stored in a char object, its value is guaranteed to be positive. If any other character is stored in a char object, the resulting value is implementation-defined but shall be within the range of values that can be represented in that type.

Name: Anonymous 2007-07-18 18:25 ID:+KT41DJE

>>68
Section: Language->Concepts->Types

Name: Anonymous 2007-07-19 3:16 ID:7uu/q3iV

ASCII IS ALL YOU NEED OTHERWISE YOU ARE A WEEABOO. ASCII IS ALL YOU NEED OTHERWISE YOU ARE A WEEABOO. ASCII IS ALL YOU NEED OTHERWISE YOU ARE A WEEABOO. ASCII IS ALL YOU NEED OTHERWISE YOU ARE A WEEABOO. ASCII IS ALL YOU NEED OTHERWISE YOU ARE A WEEABOO. ASCII IS ALL YOU NEED OTHERWISE YOU ARE A WEEABOO. ASCII IS ALL YOU NEED OTHERWISE YOU ARE A WEEABOO. ASCII IS ALL YOU NEED OTHERWISE YOU ARE A WEEABOO. ASCII IS ALL YOU NEED OTHERWISE YOU ARE A WEEABOO. ASCII IS ALL YOU NEED OTHERWISE YOU ARE A WEEABOO. ASCII IS ALL YOU NEED OTHERWISE YOU ARE A WEEABOO. ASCII IS ALL YOU NEED OTHERWISE YOU ARE A WEEABOO. ASCII IS ALL YOU NEED OTHERWISE YOU ARE A WEEABOO. ASCII IS ALL YOU NEED OTHERWISE YOU ARE A WEEABOO. ASCII IS ALL YOU NEED OTHERWISE YOU ARE A WEEABOO. ASCII IS ALL YOU NEED OTHERWISE YOU ARE A WEEABOO. ASCII IS ALL YOU NEED OTHERWISE YOU ARE A WEEABOO. ASCII IS ALL YOU NEED OTHERWISE YOU ARE A WEEABOO. ASCII IS ALL YOU NEED OTHERWISE YOU ARE A WEEABOO. ASCII IS ALL YOU NEED OTHERWISE YOU ARE A WEEABOO. ASCII IS ALL YOU NEED OTHERWISE YOU ARE A WEEABOO. ASCII IS ALL YOU NEED OTHERWISE YOU ARE A WEEABOO. ASCII IS ALL YOU NEED OTHERWISE YOU ARE A WEEABOO. ASCII IS ALL YOU NEED OTHERWISE YOU ARE A WEEABOO. ASCII IS ALL YOU NEED OTHERWISE YOU ARE A WEEABOO. ASCII IS ALL YOU NEED OTHERWISE YOU ARE A WEEABOO. ASCII IS ALL YOU NEED OTHERWISE YOU ARE A WEEABOO. ASCII IS ALL YOU NEED OTHERWISE YOU ARE A WEEABOO. ASCII IS ALL YOU NEED OTHERWISE YOU ARE A WEEABOO. ASCII IS ALL YOU NEED OTHERWISE YOU ARE A WEEABOO. ASCII IS ALL YOU NEED OTHERWISE YOU ARE A WEEABOO. ASCII IS ALL YOU NEED OTHERWISE YOU ARE A WEEABOO. ASCII IS ALL YOU NEED OTHERWISE YOU ARE A WEEABOO. ASCII IS ALL YOU NEED OTHERWISE YOU ARE A WEEABOO. ASCII IS ALL YOU NEED OTHERWISE YOU ARE A WEEABOO. ASCII IS ALL YOU NEED OTHERWISE YOU ARE A WEEABOO. ASCII IS ALL YOU NEED OTHERWISE YOU ARE A WEEABOO. ASCII IS ALL YOU NEED OTHERWISE YOU ARE A WEEABOO. ASCII IS ALL YOU NEED OTHERWISE YOU ARE A WEEABOO. ASCII IS ALL YOU NEED OTHERWISE YOU ARE A WEEABOO. ASCII IS ALL YOU NEED OTHERWISE YOU ARE A WEEABOO. ASCII IS ALL YOU NEED OTHERWISE YOU ARE A WEEABOO. ASCII IS ALL YOU NEED OTHERWISE YOU ARE A WEEABOO. ASCII IS ALL YOU NEED OTHERWISE YOU ARE A WEEABOO. ASCII IS ALL YOU NEED OTHERWISE YOU ARE A WEEABOO.

Name: Anonymous 2007-07-19 5:21 ID:vkspcyb4

>>70
Amerifag thinks no other languages/currencies/symbols/etc. exist. Not a big problem though, Amerifag will soon die of heart attack due to eating at Amerifag "restaurants".

Name: Anonymous 2007-07-19 11:56 ID:JreCCMS8

>>31
CFLAGS motherfucker, do you use them!?

Name: Anonymous 2007-07-19 12:06 ID:Heaven

>>71
Morbidly obese Eurofag just wants to draw attention away from his own obesity.

Name: Anonymous 2007-07-19 14:08 ID:6coq2HlI

>>73
lol I'm thin, kthx

Name: Anonymous 2007-07-19 17:21 ID:Heaven

>>73
Europe is so expensive, we can't afford food. Blame Socialism.

Name: Anonymous 2007-07-20 4:37 ID:7wGDr5GE

>>73
Lol? Amerifags are the ones who are (in)famous for their obesity from eating American-sized shit at American shit dumps they call "restaurants". Everything has to be big and ugly: cars, food, people...

Name: Anonymous 2007-07-20 6:04 ID:Heaven

>>76
PROTIP: most americans don't actually eat that shit.

Name: Anonymous 2007-07-20 8:06 ID:Heaven

>>77
You must be new here.

Name: Anonymous 2007-07-20 17:30 ID:Heaven

>>77
most americans eat shit.

Name: Anonymous 2009-01-14 14:50

ENTERPRISE QUALITY

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List