Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. The Lounge
  3. Learning New things from stupid messing around.....

Learning New things from stupid messing around.....

Scheduled Pinned Locked Moved The Lounge
csharpvisual-studioperformancelearning
17 Posts 12 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • G Offline
    G Offline
    grralph1
    wrote on last edited by
    #1

    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

    raddevusR realJSOPR Sander RosselS M M 7 Replies Last reply
    0
    • G grralph1

      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

      raddevusR Offline
      raddevusR Offline
      raddevus
      wrote on last edited by
      #2

      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 expect

      MsgBox ("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.

      C P G 3 Replies Last reply
      0
      • G grralph1

        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

        realJSOPR Offline
        realJSOPR Offline
        realJSOP
        wrote on last edited by
        #3

        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

        G 1 Reply Last reply
        0
        • raddevusR raddevus

          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 expect

          MsgBox ("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.

          C Offline
          C Offline
          CodeWraith
          wrote on last edited by
          #4

          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.

          G 1 Reply Last reply
          0
          • G grralph1

            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

            Sander RosselS Offline
            Sander RosselS Offline
            Sander Rossel
            wrote on last edited by
            #5

            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

            M G 2 Replies Last reply
            0
            • raddevusR raddevus

              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 expect

              MsgBox ("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.

              P Offline
              P Offline
              Peter_in_2780
              wrote on last edited by
              #6

              /* ... */ was the original C comment. Long predates //

              Software rusts. Simon Stephenson, ca 1994. So does this signature. me, 2012

              1 Reply Last reply
              0
              • Sander RosselS Sander Rossel

                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

                M Offline
                M Offline
                megaadam
                wrote on last edited by
                #7

                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"

                Sander RosselS 1 Reply Last reply
                0
                • raddevusR raddevus

                  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 expect

                  MsgBox ("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.

                  G Offline
                  G Offline
                  grralph1
                  wrote on last edited by
                  #8

                  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

                  F 1 Reply Last reply
                  0
                  • C CodeWraith

                    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.

                    G Offline
                    G Offline
                    grralph1
                    wrote on last edited by
                    #9

                    Last time before this was was most likely on a TRS-80 for me as well.

                    "Rock journalism is people who can't write interviewing people who can't talk for people who can't read." Frank Zappa 1980

                    1 Reply Last reply
                    0
                    • G grralph1

                      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

                      F Offline
                      F Offline
                      Forogar
                      wrote on last edited by
                      #10

                      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.

                      1 Reply Last reply
                      0
                      • Sander RosselS Sander Rossel

                        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

                        G Offline
                        G Offline
                        grralph1
                        wrote on last edited by
                        #11

                        Lost it years ago before I even knew about REM statements. Good Song though

                        "Rock journalism is people who can't write interviewing people who can't talk for people who can't read." Frank Zappa 1980

                        1 Reply Last reply
                        0
                        • M megaadam

                          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"

                          Sander RosselS Offline
                          Sander RosselS Offline
                          Sander Rossel
                          wrote on last edited by
                          #12

                          REDЯUM :D

                          Best, Sander sanderrossel.com Continuous Integration, Delivery, and Deployment arrgh.js - Bringing LINQ to JavaScript Object-Oriented Programming in C# Succinctly

                          1 Reply Last reply
                          0
                          • realJSOPR realJSOP

                            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

                            G Offline
                            G Offline
                            grralph1
                            wrote on last edited by
                            #13

                            OK Thanks. It all must be documented somewhere.

                            "Rock journalism is people who can't write interviewing people who can't talk for people who can't read." Frank Zappa 1980

                            1 Reply Last reply
                            0
                            • G grralph1

                              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

                              M Offline
                              M Offline
                              Mark_Wallace
                              wrote on last edited by
                              #14

                              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!

                              1 Reply Last reply
                              0
                              • G grralph1

                                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

                                M Offline
                                M Offline
                                Member 9167057
                                wrote on last edited by
                                #15

                                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.

                                1 Reply Last reply
                                0
                                • G grralph1

                                  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

                                  B Offline
                                  B Offline
                                  BryanFazekas
                                  wrote on last edited by
                                  #16

                                  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

                                  1 Reply Last reply
                                  0
                                  • G grralph1

                                    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

                                    O Offline
                                    O Offline
                                    obermd
                                    wrote on last edited by
                                    #17

                                    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.

                                    1 Reply Last reply
                                    0
                                    Reply
                                    • Reply as topic
                                    Log in to reply
                                    • Oldest to Newest
                                    • Newest to Oldest
                                    • Most Votes


                                    • Login

                                    • Don't have an account? Register

                                    • Login or register to search.
                                    • First post
                                      Last post
                                    0
                                    • Categories
                                    • Recent
                                    • Tags
                                    • Popular
                                    • World
                                    • Users
                                    • Groups