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

Learn C!

Name: Anonymous 2005-02-19 5:56

For people who want to learn the C programming language I have two great sources for you
http://www.cs.cf.ac.uk/Dave/C/CE.html A book called C Programming printed in the 80's or 70's forget when.
http://www.cs.cf.ac.uk/Dave/C/CE.html This is one of the learn C sites but better.
All I can suggest is to pull long hours of the night, write the notes down in a note book and do the exercies. Learning on your own can be hard but you get use to it and you learn better this way. If you have any questions though try searching the internet to find the answers. Here is a example of a program I worte useing the C programming book. I have not learn all of the C language though..
#include <stdio.h>
#include <math.h>
//Evaluating Trigonometric Functions
int main(int argc, char *argv[])
{
  int x,y,output;
  float r;
  printf("Type in the X and Y points\n");
  scanf("%d,%d", &x, &y);
  r = sqrt((x*x) + (y*y));
  printf("The Sqareroot Equals: %.2f\n", r);
  printf("----------------------------\n");
  printf("sin = %d/%.2f\n", y, r);
  printf("cos = %d/%.2f\n", x, r);
  printf("tan = %d/%d\n", y, x);
  printf("csc = %.2f/%d\n", r, y);
  printf("sec = %.2f/%d\n", r, x);
  printf("cos = %d/%d\n", x, y);
  return 0;
}

Name: Anonymous 2006-03-29 5:21

Debugging threads is a pain in the ass, but generators aren't. If you change the way you code to make it more stream-ey, concentrating on single units of information and using generators rather than loops, and avoiding global data, and manage to successfully implement generators using threads in the language, you can count it a new programming paradigm, one that benefits greatly from parallelism and yet it's very easy to debug and code.

I'm particularly fond of generators, the more I think about them, the more useful and nice they seem. I used something similar (fibers, or voluntary threads) a long time ago in a surprisingly good Spanish game programming language (DIV) and its modern C version (CDIV), based on a different programming paradigm where everything has to be a fiber and syncs to a multiple of the screen refresh rate. It was a pretty good experience.

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