• Charles Kincaid (2/11/2009)


    Let me see if I can show what is going on here and why. Lets number the lines

    (00) PRINT '1' -- /* ;PRINT '2' */ ;PRINT '3' /*

    (01) PRINT '4' --*/

    (02) --/*

    (03) PRINT '5'

    (04) --*/

    (05) /*

    (06) PRINT '6'

    (07) --/*

    (08) */

    (09) PRINT '7'

    (10) --*/

    (11) PRINT '8'

    Line (00) has an inline comment starting with the double dash so 2 an 3 are in the comment

    Same for (01) so 4 does print just like 1.

    Line (02) has an inline comment so the block comment starter is par of the comment and is ignored. Same for (04) and (10).

    Line (03) is not in any comment and gets executed. Same goes for line (11).

    Line (05) starts a block comment. Lines (06) and (07) are part of the block comment.

    Line (08) stops the block comment.

    but line 09 is NOT executed so it is still part of the commented out code....................

    ---------------------------------------------------------------------