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

Functional C programming

Name: Anonymous 2012-05-15 18:41

Gentlemen I conclude that C is the best language for functional programming. Observe:

typedef unsigned char u8;
u8 change_bit(u8 in_byte, u8 bit_pos, u8 new_bit) {
  return (new_bit ? in_byte | (1u << bit_pos) : in_byte & ~(1u << bit_pos));
}

Name: Anonymous 2012-05-15 18:45

C is a god among mortals

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