Learning New things from stupid messing around.....
-
I knew about /* */ for C#. That multi-line comment style has been picked up by numerous languages because it can be so helpful to block comment code. I didn't know about REM still being accepted, but I guess that makes sense. Here is VBA code from an Excel spreadsheet I just opened up to try it out.
Sub commentTest()
Rem this is a test
Rem you shouldn't really be seeing this
' these are the comments that vba seems to expectMsgBox ("rem alert")
End Sub
That's funny too, because in Excel the Rem statements turn green (as you said) and they are recognized as comments, but the code parser here on the site doesn't seem to recognize those statements as comments.
/* ... */ was the original C comment. Long predates //
Software rusts. Simon Stephenson, ca 1994. So does this signature. me, 2012
-
grralph1 wrote:
I can understand that there is some requirement for backward compatibility, but, really, this is ridiculous.
One might say this made you... Lose your religion :suss:
Best, Sander sanderrossel.com Continuous Integration, Delivery, and Deployment arrgh.js - Bringing LINQ to JavaScript Object-Oriented Programming in C# Succinctly
-
I knew about /* */ for C#. That multi-line comment style has been picked up by numerous languages because it can be so helpful to block comment code. I didn't know about REM still being accepted, but I guess that makes sense. Here is VBA code from an Excel spreadsheet I just opened up to try it out.
Sub commentTest()
Rem this is a test
Rem you shouldn't really be seeing this
' these are the comments that vba seems to expectMsgBox ("rem alert")
End Sub
That's funny too, because in Excel the Rem statements turn green (as you said) and they are recognized as comments, but the code parser here on the site doesn't seem to recognize those statements as comments.
Haha Everything we type here is a comment so perhaps they should all turn green. So also in VBA. Sort of makes sense. A bit like all the old Wordstar shortcuts that still exist in MS Office Word and other apps. This makes more sense though. I would have imagined that REM would have disappeared completely by now. I wouldn't have thought that it is an important backward compatibility thing. Maybe it is for some reason. Alas it is still a reserved word.
"Rock journalism is people who can't write interviewing people who can't talk for people who can't read." Frank Zappa 1980
-
Last time I used REM must have been on a TRS-80 (Model I) or an early Apple ][. I felt no need to get myself dirty with any BASIC since.
I have lived with several Zen masters - all of them were cats. His last invention was an evil Lasagna. It didn't kill anyone, and it actually tasted pretty good.
-
Haha Everything we type here is a comment so perhaps they should all turn green. So also in VBA. Sort of makes sense. A bit like all the old Wordstar shortcuts that still exist in MS Office Word and other apps. This makes more sense though. I would have imagined that REM would have disappeared completely by now. I wouldn't have thought that it is an important backward compatibility thing. Maybe it is for some reason. Alas it is still a reserved word.
"Rock journalism is people who can't write interviewing people who can't talk for people who can't read." Frank Zappa 1980
Quote:
old Wordstar shortcuts that still exist in MS Office Word
..and because of that, Redo is Ctrl+Y in many apps instead of the much more sensible Shift+Ctrl+Z, clearly and intuitively the opposite of Ctrl+Z. Dammit!
- I would love to change the world, but they won’t give me the source code.
-
REM REM REM REM REDM REDM REDM REDRM REDRM REDUM REDRUM REDRUM REDRUM!
"If we don't change direction, we'll end up where we're going"
-
grralph1 wrote:
I can understand that there is some requirement for backward compatibility, but, really, this is ridiculous.
One might say this made you... Lose your religion :suss:
Best, Sander sanderrossel.com Continuous Integration, Delivery, and Deployment arrgh.js - Bringing LINQ to JavaScript Object-Oriented Programming in C# Succinctly
-
You can turn off the auto-generated single asterisk in tools/settings.
".45 ACP - because shooting twice is just silly" - JSOP, 2010
-----
You can never have too much ammo - unless you're swimming, or on fire. - JSOP, 2010
-----
When you pry the gun from my cold dead hands, be careful - the barrel will be very hot. - JSOP, 2013 -
Years and years ago I can remember putting data into REM statements in order to save memory. Then poking and peeking things. In those days we didn't have very much memory really. So I am surprised that I remembered it at all. A REM statement was called a remark in those days and now is more commonly referred to as a comment statement. I had Visual Studio 2017 open in a VB.Net Winform Project and just typed "REM This is a comment" and what the elephant it went green and thus was treated as a comment statement. I was shocked. Never knew that you could do that. OK that was just after the class declaration so tried it within the code and the intellisense wouldn't allow it. Wanting to and changing it to RemoveHandler as soon as you entered the space after the REM. However If I pasted it there it would immediately accept it as a comment statement. I can understand that there is some requirement for backward compatibility, but, really, this is ridiculous. However sort of historically wonderful as well. So I also opened up a C# project and tried some old C stuff and this is also in there. Tried /* this is a * comment */ It all turned green. It is actually better than just typing // on every line as it auto inserts the * until you terminate it with a */ This was accepted any where I typed it. Didn't know about this either. Again seems a bit ridiculous but sort of nice. Sometimes you learn from doing daft things. (Maybe everyone else knew about this. I didn't)
"Rock journalism is people who can't write interviewing people who can't talk for people who can't read." Frank Zappa 1980
It's a pretty much pointless attempt to encourage coders to add documentation in their code -- a waste of time, I know, because "Good Code Doesn't Need documentation", but at least they tried.
I wanna be a eunuchs developer! Pass me a bread knife!
-
Years and years ago I can remember putting data into REM statements in order to save memory. Then poking and peeking things. In those days we didn't have very much memory really. So I am surprised that I remembered it at all. A REM statement was called a remark in those days and now is more commonly referred to as a comment statement. I had Visual Studio 2017 open in a VB.Net Winform Project and just typed "REM This is a comment" and what the elephant it went green and thus was treated as a comment statement. I was shocked. Never knew that you could do that. OK that was just after the class declaration so tried it within the code and the intellisense wouldn't allow it. Wanting to and changing it to RemoveHandler as soon as you entered the space after the REM. However If I pasted it there it would immediately accept it as a comment statement. I can understand that there is some requirement for backward compatibility, but, really, this is ridiculous. However sort of historically wonderful as well. So I also opened up a C# project and tried some old C stuff and this is also in there. Tried /* this is a * comment */ It all turned green. It is actually better than just typing // on every line as it auto inserts the * until you terminate it with a */ This was accepted any where I typed it. Didn't know about this either. Again seems a bit ridiculous but sort of nice. Sometimes you learn from doing daft things. (Maybe everyone else knew about this. I didn't)
"Rock journalism is people who can't write interviewing people who can't talk for people who can't read." Frank Zappa 1980
Typing // before each line is too much work indeed, but marking the block and pressing Ctrl+# (substitute for the shortcut of your IDE) is way faster.
-
Years and years ago I can remember putting data into REM statements in order to save memory. Then poking and peeking things. In those days we didn't have very much memory really. So I am surprised that I remembered it at all. A REM statement was called a remark in those days and now is more commonly referred to as a comment statement. I had Visual Studio 2017 open in a VB.Net Winform Project and just typed "REM This is a comment" and what the elephant it went green and thus was treated as a comment statement. I was shocked. Never knew that you could do that. OK that was just after the class declaration so tried it within the code and the intellisense wouldn't allow it. Wanting to and changing it to RemoveHandler as soon as you entered the space after the REM. However If I pasted it there it would immediately accept it as a comment statement. I can understand that there is some requirement for backward compatibility, but, really, this is ridiculous. However sort of historically wonderful as well. So I also opened up a C# project and tried some old C stuff and this is also in there. Tried /* this is a * comment */ It all turned green. It is actually better than just typing // on every line as it auto inserts the * until you terminate it with a */ This was accepted any where I typed it. Didn't know about this either. Again seems a bit ridiculous but sort of nice. Sometimes you learn from doing daft things. (Maybe everyone else knew about this. I didn't)
"Rock journalism is people who can't write interviewing people who can't talk for people who can't read." Frank Zappa 1980
It may be that REM still is a part of VB, not because someone left it in, but because no one took it out. :-D
-
Years and years ago I can remember putting data into REM statements in order to save memory. Then poking and peeking things. In those days we didn't have very much memory really. So I am surprised that I remembered it at all. A REM statement was called a remark in those days and now is more commonly referred to as a comment statement. I had Visual Studio 2017 open in a VB.Net Winform Project and just typed "REM This is a comment" and what the elephant it went green and thus was treated as a comment statement. I was shocked. Never knew that you could do that. OK that was just after the class declaration so tried it within the code and the intellisense wouldn't allow it. Wanting to and changing it to RemoveHandler as soon as you entered the space after the REM. However If I pasted it there it would immediately accept it as a comment statement. I can understand that there is some requirement for backward compatibility, but, really, this is ridiculous. However sort of historically wonderful as well. So I also opened up a C# project and tried some old C stuff and this is also in there. Tried /* this is a * comment */ It all turned green. It is actually better than just typing // on every line as it auto inserts the * until you terminate it with a */ This was accepted any where I typed it. Didn't know about this either. Again seems a bit ridiculous but sort of nice. Sometimes you learn from doing daft things. (Maybe everyone else knew about this. I didn't)
"Rock journalism is people who can't write interviewing people who can't talk for people who can't read." Frank Zappa 1980
I never used a REM statement in my batch/command scripts. I use :: for this purpose. REM still parses the entire line while :: is a label and the parser stops at the end of the label. You can't jump to :: so it works as a REM while at the same time being significantly faster.