Quantcast
Channel: First steps - JuliaLang
Viewing all articles
Browse latest Browse all 2795

Julia Python equivalent of __main__?

$
0
0

@Darione wrote:

In Julia, what is the python equivalent of if name == “main” ?
For example:

def main():
    pass

def print_tre_volte(parola):
    print(parola)
    print(parola)
    print(parola)

if __name__ == "__main__":
    main()

It the script is run directly, it will does main(), otherwise no.

In Julia?

Posts: 2

Participants: 2

Read full topic


Viewing all articles
Browse latest Browse all 2795

Trending Articles