what is best : 0 OR Undefined ?

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #214543 quote
    ZeroCafeineZeroCafeine
    Participant
    Senior

    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 quote
    GraHalGraHal
    Participant
    Master

    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?? 🙂

    ZeroCafeine thanked this post
    #214546 quote
    GraHalGraHal
    Participant
    Master

    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 quote
    NicolasNicolas
    Keymaster
    Legend

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

    ZeroCafeine thanked this post
Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.
ProRealAI ProRealAI New

Stuck on this ProBuilder code?

Describe what this topic is trying to build, in plain English, and ProRealAI writes the ProRealTime™ indicator, screener or system for you.

Available in 7 languages
Try ProRealAI

what is best : 0 OR Undefined ?


ProOrder: Automated Strategies & Backtesting

New Reply
Author
Summary

This topic contains 3 replies,
has 3 voices, and was last updated by NicolasNicolas
3 years, 4 months ago.

Topic Details
Forum: ProOrder: Automated Strategies & Backtesting
Language: English
Started: 05/11/2023
Status: Active
Attachments: No files
ProRealCode ProRealCode
Loading...