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. Web Development
  3. Terminating Semicolon

Terminating Semicolon

Scheduled Pinned Locked Moved Web Development
questionlearningcsharpcryptographybusiness
10 Posts 5 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.
  • N Offline
    N Offline
    Nekosohana
    wrote on last edited by
    #1

    I had a discussion with my professor, (who is an associate professor) and he didn't effectively explain terminating semicolons to me. I started self-learning in C# and am now in a local CC for a C# certificate. Part of the requirements is a Beginning Web Programming class. Love the class and am loving web programming. Here is my question though. In regards to the terminating semicolon, is there a time when you shouldn't use it? Specifically, I lost points in a test for the following: Write the format for an hotspot: (I wrote) Basically, I copied it right out of the book, but I got knocked off for the terminating semicolons. I don't really care whether I was right or wrong in my argument with the professor, I just want to know the right way to do things, so I don't screw this up when I go to work for someone. Thanks for your responses. Beginning Programmer - Still learning as much as possible.

    S P C 3 Replies Last reply
    0
    • N Nekosohana

      I had a discussion with my professor, (who is an associate professor) and he didn't effectively explain terminating semicolons to me. I started self-learning in C# and am now in a local CC for a C# certificate. Part of the requirements is a Beginning Web Programming class. Love the class and am loving web programming. Here is my question though. In regards to the terminating semicolon, is there a time when you shouldn't use it? Specifically, I lost points in a test for the following: Write the format for an hotspot: (I wrote) Basically, I copied it right out of the book, but I got knocked off for the terminating semicolons. I don't really care whether I was right or wrong in my argument with the professor, I just want to know the right way to do things, so I don't screw this up when I go to work for someone. Thanks for your responses. Beginning Programmer - Still learning as much as possible.

      S Offline
      S Offline
      Shog9 0
      wrote on last edited by
      #2

      Nekosohana wrote:

      Basically, I copied it right out of the book, but I got knocked off for the terminating semicolons.

      If you copied that out of a book, then that's one messed up book. You don't terminate HTML attributes with semicolons. You wrap them in quotes. Which you did. There's one specific attribute, style, that can contain multiple values delimited by semicolons... but even then, they're part of the value not the definition, so they go inside the quotes. Other uses for semicolons in HTML include terminating character entities (such as: & or A) and terminating statements in blocks of Javascript wrapped in <script> tags or event handler attributes.

      N 1 Reply Last reply
      0
      • S Shog9 0

        Nekosohana wrote:

        Basically, I copied it right out of the book, but I got knocked off for the terminating semicolons.

        If you copied that out of a book, then that's one messed up book. You don't terminate HTML attributes with semicolons. You wrap them in quotes. Which you did. There's one specific attribute, style, that can contain multiple values delimited by semicolons... but even then, they're part of the value not the definition, so they go inside the quotes. Other uses for semicolons in HTML include terminating character entities (such as: & or A) and terminating statements in blocks of Javascript wrapped in <script> tags or event handler attributes.

        N Offline
        N Offline
        Nekosohana
        wrote on last edited by
        #3

        The book wasn't messed up, I added the terminating semicolons myself. That's what I wanted clarification, since it hasn't affected my outputs at all. The challenge I am facing is that when I started learning C# I had to learn the 'why' of what I was doing (a little theory to go with the practice). With this class there is no explination of 'why', just "do it this way". Meh. Thanks for the help, I appreciate it.

        Beginning Programmer - Still learning as much as possible.

        1 Reply Last reply
        0
        • N Nekosohana

          I had a discussion with my professor, (who is an associate professor) and he didn't effectively explain terminating semicolons to me. I started self-learning in C# and am now in a local CC for a C# certificate. Part of the requirements is a Beginning Web Programming class. Love the class and am loving web programming. Here is my question though. In regards to the terminating semicolon, is there a time when you shouldn't use it? Specifically, I lost points in a test for the following: Write the format for an hotspot: (I wrote) Basically, I copied it right out of the book, but I got knocked off for the terminating semicolons. I don't really care whether I was right or wrong in my argument with the professor, I just want to know the right way to do things, so I don't screw this up when I go to work for someone. Thanks for your responses. Beginning Programmer - Still learning as much as possible.

          P Offline
          P Offline
          PIEBALDconsult
          wrote on last edited by
          #4

          That's not a "Terminating Semicolon"; that's an extraneous semi-colon.

          N 1 Reply Last reply
          0
          • P PIEBALDconsult

            That's not a "Terminating Semicolon"; that's an extraneous semi-colon.

            N Offline
            N Offline
            Nekosohana
            wrote on last edited by
            #5

            I know what extraneous means, so I am not sure if you are being facetious or not.

            Beginning Programmer - Still learning as much as possible.

            P P 2 Replies Last reply
            0
            • N Nekosohana

              I know what extraneous means, so I am not sure if you are being facetious or not.

              Beginning Programmer - Still learning as much as possible.

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

              If you knew what it meant, you would know whether he was being facetious or not. :-D

              Paul Marfleet "No, his mind is not for rent To any God or government" Tom Sawyer - Rush

              N 1 Reply Last reply
              0
              • P pmarfleet

                If you knew what it meant, you would know whether he was being facetious or not. :-D

                Paul Marfleet "No, his mind is not for rent To any God or government" Tom Sawyer - Rush

                N Offline
                N Offline
                Nekosohana
                wrote on last edited by
                #7

                Heh. However, I am new enough and the professor is teaching zero theory (which is frustrating). I assume he is being facetious, but it could just as easily be used technically and I wouldn't know...

                Beginning Programmer - Still learning as much as possible.

                1 Reply Last reply
                0
                • N Nekosohana

                  I know what extraneous means, so I am not sure if you are being facetious or not.

                  Beginning Programmer - Still learning as much as possible.

                  P Offline
                  P Offline
                  PIEBALDconsult
                  wrote on last edited by
                  #8

                  Me? Nooooo... not me, nuh uh. :-D

                  1 Reply Last reply
                  0
                  • N Nekosohana

                    I had a discussion with my professor, (who is an associate professor) and he didn't effectively explain terminating semicolons to me. I started self-learning in C# and am now in a local CC for a C# certificate. Part of the requirements is a Beginning Web Programming class. Love the class and am loving web programming. Here is my question though. In regards to the terminating semicolon, is there a time when you shouldn't use it? Specifically, I lost points in a test for the following: Write the format for an hotspot: (I wrote) Basically, I copied it right out of the book, but I got knocked off for the terminating semicolons. I don't really care whether I was right or wrong in my argument with the professor, I just want to know the right way to do things, so I don't screw this up when I go to work for someone. Thanks for your responses. Beginning Programmer - Still learning as much as possible.

                    C Offline
                    C Offline
                    Christian Graus
                    wrote on last edited by
                    #9

                    C# and XML/HTML are two different things. Not every language or format has terminating semicolons. I'm not sure if this is XML or HTML, but either way, the semicolons are wrong. It's not C#.

                    Christian Graus - Microsoft MVP - C++ "also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )

                    N 1 Reply Last reply
                    0
                    • C Christian Graus

                      C# and XML/HTML are two different things. Not every language or format has terminating semicolons. I'm not sure if this is XML or HTML, but either way, the semicolons are wrong. It's not C#.

                      Christian Graus - Microsoft MVP - C++ "also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )

                      N Offline
                      N Offline
                      Nekosohana
                      wrote on last edited by
                      #10

                      Thank you everyone. I appreciate you clarifying this for me!

                      Beginning Programmer - Still learning as much as possible.

                      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