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

Which is the better implementation?

Name: Anonymous 2014-09-05 19:47

int main()
{
printf("5+6=%d", 5+6);
return 0;
}


Or

////////////////////////////////////////
// AddNumbers
// param1 firstParam - The first value to add
// param2 secondParam - The second value to add
// return - The firstParam added to the secondParam
//
int addNumbers( int firstParam,
int secondParam )
{
// Here is some info
int theReturn = firstParam + secondParam;

// Now return the value
return theReturn;
}

// Entry for program
int main()
{
// Initialize variables
int firstParam = 5;
int secondParam = 6;

// Call the function
int returnValue = AddNumbers( firstParam, secondParam );

// Print out the value
printf("%d+%d=%d", firstParam, secondParam, returnValue );

return 0;
}

Name: Anonymous 2014-09-05 19:48

second but you need bigger names
(Parameter instead of param for example)
And typedef int to integer
And use EXIT_SUCCESS
And typedef void to nothing and use it in main

Name: Anonymous 2014-09-05 19:49

int main() {
printf("5+6=11");
return 0
}

Name: Anonymous 2014-09-05 19:52

Most people call two numbers added together a ``sum'', not a ``returnValue'', that just sounds stupid.

Name: Anonymous 2014-09-05 19:57

make an adderFactory you stupid fuck.

Name: Anonymous 2014-09-05 19:59

>>5
This isn't java

Name: Anonymous 2014-09-05 21:04

(define add-numbers (lambda (l) (apply + l)))

let add_numbers = (+);;

addNumbers := method(
call message arguments map(
doInContext(call sender))
sum)

Name: Anonymous 2014-09-05 21:48

>>1

Better: 5+6

Name: Anonymous 2014-09-05 22:13

>>1
Nice biased examples, faggot.

First one is immediately comprehensible, the second one is way too complex to be understood by just glancing at it. The converse would be true with different cases.

Name: Anonymous 2014-09-05 22:16

>>9
////////////////////////////////////////
// AddNumbers
// param1 firstParam - The first value to add
// param2 secondParam - The second value to add
// return - The firstParam added to the secondParam

nigger

Name: Anonymous 2014-09-05 22:17

>>10
You have to read all the source code carefully to be sure there's nothing else being done.

Name: Anonymous 2014-09-05 23:53

kinda reminds me of scientific papers.

Name: Anonymous 2014-09-06 18:27

>>4
but it's the value to return

Name: /jewtube/ 2014-09-06 21:54

>>13
What if your program has more than one function? That would get kind of confusing.

Name: Anonymous 2014-09-06 22:17

>>14

What if your anus has more than one function?

Name: Anonymous 2014-09-07 0:26

>>15

What if the electronic programmable dildo lodged in your anus has more than one function?

Name: Anonymous 2014-09-07 7:37

>>1

Stop being a faggot and use /* shizzle */ comments.

Name: Anonymous 2014-09-08 19:37

my university comp-sci classes didn't prepare me for using Fjölnir in the real world. now i can't land a single programming job =(

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