what is best : 0 OR Undefined ?

Forums ProRealTime English forum ProOrder support what is best : 0 OR Undefined ?

Viewing 4 posts - 1 through 4 (of 4 total)
  • #214543

    Hi

    I’m slowly progressing in programming as an old man, I realize that I often have variables lying around so I’ll try to make it a habit to delete them after use,

    what do you advise me to use, is it better to set it to 0 or undefined (because 0 is still defined)

    or maybe some links to help me avoid programming traps

    tks in advance for all you light 🙂

    #214545

    variables lying around

    In your code?

    If yes, then easisest is to rem / comment them out using // at the begining of the Line on which the variable is located.

    Somehow I think you mean different than I am thinking?? 🙂

    1 user thanked author for this post.
    #214546

    I usually Rem redundant code. If I feel in a ‘tidying up / squeaky clean mood’ I delete.

    However, it can be useful to leave redundant code rem’d out as a reminder of what you tried … else you may waste your tme trying it again in the future??

    #214552

    For reference, variables cannot be undefined if they had a value once.

    1 user thanked author for this post.
Viewing 4 posts - 1 through 4 (of 4 total)

Create your free account now and post your request to benefit from the help of the community
Register or Login