for stop? Don't stop!

Plump!

I saw an article saying "for stop". I was researching nextTick and learned from this article. Is it still the best-by date in 2014?

That's very mathematical. There are too many messy functions. Write in C / C ++ / Java / Javascript syntax for the time being. Basic's isn't pretty.

** for (initialization; condition; iterator) **

It's messy because I read it. For the time being, they are sorted in order of evaluation.

** for (initialization; iterator) **

This is [Mathematical Induction](http://ja.wikipedia.org/wiki/%E6%95%B0%E5%AD%A6%E7%9A%84%E5%B8%B0%E7% B4% 8D% E6% B3% 95), right? There is no such appropriate expression for a well-ordered set.

So, in the case of programming, we usually want to represent a finite set, so we add conditions.

** for (initialization; iterator) where (condition) **

Is it easy to understand if I write it like this? If you don't like for, I think you should prepare soyu sugar. It's a preprocessor.

Original article, number theory person? You will be bound by the spirit of Uncle Peano.

Digression

Finally, this sharp article has also added a slapstick. The most essential solution to the problem of the original article "Output an integer from 1 to 100, but using 5 different methods" is ① for as described above. And the fastest solution is ② console.log '1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19, 20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44, 45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69, 70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94, I thought it was 95,96,97,98,99,100'. I'm not fooling around so far. If it's an optimization game, it's a legitimate answer. However, I found a faster solution than that, so I would like to report it. What's more, in many languages there is no need to change the source code, and it is output before execution. (It's about time the punch line starts to come out) ③

compile-error.coffee


Integer from 1 to 100

The "compilation result" is as follows. The output is the same when I try to run it.

Compile result


/path/to/script/compile-error.coffee:1:2: error: unexpected identifier
Integer from 1 to 100
 ^^^^^^^^

Well, this is a bad answer, but it does output. I think the different ways in the "different methods" are a little unrivaled. In addition, there is a similar non-method of (4) separating the file names with commas and using only "" "in the source code. The types of compiler errors are also different. Then, ⑤ Enter an appropriate number and comma of 80 characters or more per line, repeat it for 100 lines, and apply it to CoffeeLint to output a number from 1 to 100 as a line number. This is also a similar non-method. This one will compile. This completes 5 types.

Regarding the message of the original article, I think that the above text was dissatisfied from the front, so I'm sorry for the digression.

Then.

Recommended Posts

for stop? Don't stop!
Stop port for a certain Tomcat plug-in (8081)
[Swift] Stop processing for comma n seconds (delayed processing)