locked
Quick Question: Option Strict RRS feed

  • Question

  • Probably a silly question, maybe someone knows... When you have such a line "Option Strict On" in your code, does it get converted to machine language and included in your exe, or is it removed from the compiled code?

    My guess would be that since its a compiler option, it doesn't actually get compiled into the exe.


    If you want something you've never had, you need to do something you've never done.
    Everyone(not just the thread starter) should take the time to mark helpful posts, propose answers, and mark answers to questions.

    Thursday, November 15, 2012 8:14 PM

Answers

  • I'd guess it's not in the compiled code at all, it changes the parsing rules in the editor as far as flagging "incorrect" statements.

     
    • Marked as answer by Paul Ishak Thursday, November 15, 2012 8:37 PM
    Thursday, November 15, 2012 8:33 PM
  • I think your guess is right - it's a compiler flag so I'd not expect anything in the IL.

    Regards David R
    ---------------------------------------------------------------
    The great thing about Object Oriented code is that it can make small, simple problems look like large, complex ones.
    Object-oriented programming offers a sustainable way to write spaghetti code. - Paul Graham.
    Every program eventually becomes rococo, and then rubble. - Alan Perlis
    The only valid measurement of code quality: WTFs/minute.

    • Proposed as answer by Frank L. Smith Thursday, November 15, 2012 8:28 PM
    • Marked as answer by Paul Ishak Thursday, November 15, 2012 8:30 PM
    Thursday, November 15, 2012 8:26 PM

All replies

  • I think your guess is right - it's a compiler flag so I'd not expect anything in the IL.

    Regards David R
    ---------------------------------------------------------------
    The great thing about Object Oriented code is that it can make small, simple problems look like large, complex ones.
    Object-oriented programming offers a sustainable way to write spaghetti code. - Paul Graham.
    Every program eventually becomes rococo, and then rubble. - Alan Perlis
    The only valid measurement of code quality: WTFs/minute.

    • Proposed as answer by Frank L. Smith Thursday, November 15, 2012 8:28 PM
    • Marked as answer by Paul Ishak Thursday, November 15, 2012 8:30 PM
    Thursday, November 15, 2012 8:26 PM
  • The general consensus of two known talented programmers is good enough for me. Thanks guys.

    Edit: 3


    If you want something you've never had, you need to do something you've never done.
    Everyone(not just the thread starter) should take the time to mark helpful posts, propose answers, and mark answers to questions.


    • Edited by Paul Ishak Thursday, November 15, 2012 8:39 PM
    Thursday, November 15, 2012 8:31 PM
  • I'd guess it's not in the compiled code at all, it changes the parsing rules in the editor as far as flagging "incorrect" statements.

     
    • Marked as answer by Paul Ishak Thursday, November 15, 2012 8:37 PM
    Thursday, November 15, 2012 8:33 PM
  • Paul,

    It is not compiled in the exe. But without it a kind of different code can be compiled into the exe. 

    However, in fact is nothing from your VB code (beside constants) included in an exe. You are only creating for people readable sentences which will at last be compiled in for the computer understandable CIL code. 

    For that is the Option Strict On an important thing which influences the created exe.

    Not that I deny what others have written, I deny what you ask. It is like asking if Afro Americans, Asian Americans and Euro Americans are Americans. In my idea they are, however some will tell you they are not original Americans. But if you are an American is not depending from the moment your predecessors entered America. The paradise was not located in America but in Africa (whatever religion or non religion there is) but if the result is that you feel yourself an American then you are an American.

    Just before you think this is a political statement. I'm in no way an American, I'm proud to be an European.

    :-)


    Success
    Cor



    • Edited by Cor Ligthert Thursday, November 15, 2012 11:16 PM
    Thursday, November 15, 2012 11:15 PM
  • Cor

    I expect there are even people around who would deny that Native Americans are Americans even though they are the original Americans. :)

    It reminds me of a comedian (who I think was Cherokee or possibly Sioux) on a visit to UK who said "I hear a lot of English people saying they wished immigrants would return home. ... I can understand that."

    I also suspect Paul knows about Option Strict but just had a 'Hang on a mo' moment.


    Regards David R
    ---------------------------------------------------------------
    The great thing about Object Oriented code is that it can make small, simple problems look like large, complex ones.
    Object-oriented programming offers a sustainable way to write spaghetti code. - Paul Graham.
    Every program eventually becomes rococo, and then rubble. - Alan Perlis
    The only valid measurement of code quality: WTFs/minute.

    Thursday, November 15, 2012 11:30 PM
  • David,

    I assume you are an American otherwise you would understand that your message is for somebody with less contact with persons from the USA then me completely not understandable. 

    Why? Because most persons living the last 700 years in England are beside real from that isle also decedents from immigrants.  Anglos(Danmark) Frysians (Dutch which includes Belgians from Flanders ) Saxonians (Germans) Romans(Italia) and Normans (French and Norway). So what is an Immigrant in your message. An Englishmen in the USA or somebody not real original Galois in the UK. 

    I hope to explain with this that in this question every answer in this is true, as long as it fits the one who asked the question.

    Nevertheless I think we agree 

    :-)


    Success
    Cor



    Thursday, November 15, 2012 11:54 PM
  • Cor

    I fear my attempt at humour failed. :) But I did find the comedian's remark quite funny.

    I'm as American as the Queen, and probably more English. I'm also of the view that if everyone went back to the country of their ancestors we'd all go back to Africa. Since that's where we started from some 50,000 years ago (give or take a few thousand years - a mere blink in time).


    Regards David R
    ---------------------------------------------------------------
    The great thing about Object Oriented code is that it can make small, simple problems look like large, complex ones.
    Object-oriented programming offers a sustainable way to write spaghetti code. - Paul Graham.
    Every program eventually becomes rococo, and then rubble. - Alan Perlis
    The only valid measurement of code quality: WTFs/minute.

    Friday, November 16, 2012 12:23 AM
  • This is all very interesting, and I do appreciate the comments. Thanks ;)

    If you want something you've never had, you need to do something you've never done.
    Everyone(not just the thread starter) should take the time to mark helpful posts, propose answers, and mark answers to questions.

    Friday, November 16, 2012 1:12 AM
  • What I want to know is where do the people who are half English, half British, and half Irish go? hmm that's one too many halves...

    If you want something you've never had, you need to do something you've never done.
    Everyone(not just the thread starter) should take the time to mark helpful posts, propose answers, and mark answers to questions.

    Friday, November 16, 2012 1:15 AM