Why did the original code for FIND.COM use lop as a label instead of loop? (blogs.msdn.com) 22 points by cremno 11y ago ↗ HN
[–] geocar 11y ago ↗ Then why is it `lop:` instead of `lop`?Doesn't the colon mean label? [–] RodgerTheGreat 11y ago ↗ The post says the colon is optional. Seems like a poorly thought-out syntax. [–] geocar 11y ago ↗ Okay, so maybe "lop:ret" and "lop ret" can be parsed the same (agree about the poorly thought-out syntax), but I don't see why "loop:ret" needs to be parsed as "loop ret" unless the colon is actually whitespace in masm. [–] hermanhermitage 11y ago ↗ The ':' is optional when followed by a directive."Loop" is also a valid label on at least say MASM 5.0, just need to use /w0 to suppress the warning.
[–] RodgerTheGreat 11y ago ↗ The post says the colon is optional. Seems like a poorly thought-out syntax. [–] geocar 11y ago ↗ Okay, so maybe "lop:ret" and "lop ret" can be parsed the same (agree about the poorly thought-out syntax), but I don't see why "loop:ret" needs to be parsed as "loop ret" unless the colon is actually whitespace in masm.
[–] geocar 11y ago ↗ Okay, so maybe "lop:ret" and "lop ret" can be parsed the same (agree about the poorly thought-out syntax), but I don't see why "loop:ret" needs to be parsed as "loop ret" unless the colon is actually whitespace in masm.
[–] hermanhermitage 11y ago ↗ The ':' is optional when followed by a directive."Loop" is also a valid label on at least say MASM 5.0, just need to use /w0 to suppress the warning.
[–] virulent 11y ago ↗ I enjoyed the linked post[1] at the bottom more than the post itself. #define while(x) if(x) Too bad April 1 is already gone, I'm kind of tempted to try and sneak that in.[1] http://www.cs.earlham.edu/~skylar/humor/Unix/c.language.pran...
[–] cbd1984 11y ago ↗ But wouldn't the colon at the end disambiguate? It seems like the colon is mandatory for labels and forbidden for opcodes.(My comment, which got flagged as spam. Is spam-flagging common on that blog, or is it just random?)
6 comments
[ 3.3 ms ] story [ 20.2 ms ] threadDoesn't the colon mean label?
"Loop" is also a valid label on at least say MASM 5.0, just need to use /w0 to suppress the warning.
[1] http://www.cs.earlham.edu/~skylar/humor/Unix/c.language.pran...
(My comment, which got flagged as spam. Is spam-flagging common on that blog, or is it just random?)