Nullifying the declared variables automatically?

Discussion in 'AutoCAD' started by RaghuMN, Apr 8, 2004.

  1. RaghuMN

    RaghuMN Guest

    Marc'Antonio Alessi, CAB2k, zeha, Doug Broad, hendle, Jeff Misher: Thank you all for replying.

    Since I was unable to get connected for these days, I could not respond.

    Of the responses from Michael Puckett, BillZ and Marc'Antonio Alessi, I personally felt that BillZ's method would be a better choice. I would welcome anybody who would convince me for other suggestions too. Yet, I have to work for some more time with these responses.

    This is a subject that effects every one.
    When certain codes run into 1000's of lines, searching for variables becomes a hectic task.
    My feeling is, through automation of this activity (though this can induct some lazyness factor into us), we can ensure that we do not miss any variable.

    I would like to see more suggestions / discussions on this issue to better the current status of this issue.

    Thanks,
    MNRaghu
     
    RaghuMN, Apr 12, 2004
    #21
  2. RaghuMN

    Tom Smith Guest

    This is a subject that effects every one.

    It is not ever an issue unless the code is written poorly. I agree with
    Doug: the variables should be declared local at the time the program is
    written. It's inexcusable, IMHO, to allow "1000's of lines" of code to
    develop without managing the variables properly.
     
    Tom Smith, Apr 12, 2004
    #22
  3. RaghuMN

    BillZ Guest

    I agree with Tom,
    I use this method to "double check" my programs after completion to see if I missed localizing any variables.
    I usually list my vars as I go and rem them out if I need to see the values at runtime.

    Bill
     
    BillZ, Apr 12, 2004
    #23
  4. I agree with Doug.

    --
     
    Marc'Antonio Alessi, Apr 12, 2004
    #24
  5. RaghuMN

    RaghuMN Guest

    Doug, Marc, BillZ,
    In principle and as an ideal programming scenario, I agree with all of you.
    Certain times, when we observe that the localisation has not been performed on our old programs when we were unmatured as today, and programs made by some one else unprofessionaly, we tend to become lazy to modify such programs!!!

    Thanks,
    MNRaghu
     
    RaghuMN, Apr 13, 2004
    #25
Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.