mersenneforum.org Modern C
 Register FAQ Search Today's Posts Mark Forums Read

 2016-01-09, 03:21 #1 Dubslow Basketry That Evening!     "Bunslow the Bold" Jun 2011 40
 2016-01-09, 09:20 #2 Nick     Dec 2012 The Netherlands 24·101 Posts That's the first website I've ever visited on St. Helena (if it's really there)!
2016-01-09, 09:42   #3
LaurV
Romulan Interpreter

Jun 2011
Thailand

5·17·109 Posts

Quote:
 Originally Posted by Nick That's the first website I've ever visited on St. Helena (if it's really there)!
It is not. The second-level is not a valid one (from the seven), it is used for short-cuting the links, same like fold.it or isup.me

 2016-01-09, 12:31 #4 rogue     "Mark" Apr 2003 Between here and the 22·7·223 Posts I learned a few things, although I don't know how much of it I would use. The company I work for was stuck on C89 coding because their standards were based on K&R C. Most employees were told to buy the book and code to the standards in that. Yuck! I convinced them to support C99 even though M\$ doesn't officially support in VisualStudio . All I really wanted was the ability to use // comments. Yes, we had coding standards that forbade // style comments because there are some ancient compilers that don't support them. Interestingly nobody could provide a single example of a compiler that didn't support // style comments past the turn of the century. Note that our internal standard change finally occurred around 2009. I slightly disagree about the memory allocation one with double pointers (aka handles). If an application cannot allocate the memory it needs to function, there is nothing wrong with just terminating the application rather than bubbling some error up the call stack.
 2016-01-09, 15:41 #5 bgbeuning   Dec 2014 FF16 Posts Does C still let you call a function without declaring it first? We used to get errors like Code: int ten() { retrun (10); } link error: retrun undefined The only feature I saw not included in C++ is the Variable Length Arrays.
2016-01-09, 23:20   #6
chalsall
If I May

"Chris Halsall"
Sep 2002

2×3×1,579 Posts

Quote:
 Originally Posted by bgbeuning Does C still let you call a function without declaring it first?
Generally, no.

Quote:
 Originally Posted by bgbeuning We used to get errors like Code: int ten() { retrun (10); } link error: retrun undefined
Was retrun() a function you defined, or did you mean return()?

 2016-01-10, 00:25 #7 Dubslow Basketry That Evening!     "Bunslow the Bold" Jun 2011 40
 2016-01-10, 14:38 #8 Nick     Dec 2012 The Netherlands 65016 Posts See also: the International Obfuscated C code Contest http://ioccc.org/
2016-01-10, 22:30   #9
chalsall
If I May

"Chris Halsall"
Sep 2002

2·3·1,579 Posts

Quote:
 Originally Posted by Dubslow I think he meant the typo of the keyword "return" did not cause a compilation error, because using undeclared functions was allowed (resulting in the link error since the function doesn't actually exist). He of course meant to use the return keyword.
Ah... Thanks. Stupid (human) interpreter error...

But at least (even in the olden days before functions had to be pre-declared) the tool chain threw an error before an executable was created. As opposed to, for example, pointer errors or array overruns which the compiler and linker can't catch.

Remember the old saying: "C. All the power, and all the safety features, of a chain saw (or high explosives).

2016-01-11, 10:33   #10
xilman
Bamboozled!

"𒉺𒌌𒇷𒆷𒀭"
May 2003
Down not across

3×3,529 Posts

Quote:
 Originally Posted by chalsall Remember the old saying: "C. All the power, and all the safety features, of a chain saw (or high explosives).
OTOH

When I find my code in tons of trouble,
Friends and colleagues come to me
Speaking words of wisdom:
Write in C.

2016-01-11, 13:56   #11
chalsall
If I May

"Chris Halsall"
Sep 2002

2×3×1,579 Posts

Quote:
 Originally Posted by xilman Write in C.
Please don't get me wrong; I _love_ C.

But it's not for the faint of heart, nor hairless of chest....

 Similar Threads Thread Thread Starter Forum Replies Last Post VBCurtis Factoring 29 2016-02-12 20:45 f1pokerspeed Soap Box 10 2013-12-28 16:27 Unregistered Information & Answers 15 2010-07-21 14:14 Marco Hardware 28 2003-11-02 23:21

All times are UTC. The time now is 22:58.

Fri Feb 26 22:58:52 UTC 2021 up 85 days, 19:10, 0 users, load averages: 2.04, 2.37, 2.53