inkle / inkle/ink

Dinstinguishing whether a script has been INCLUDED or is top-level

Open
#405 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
C#
Stars
4.9k
Forks
540
PR merge metrics
No merged PRs in 30d

Description

Is there a canonical way to detect whether a particular Ink script is top-level or whether it has been `INCLUDE`d by another script? This would be equivalent to the common Python idiom `if __name__ == '__main__'` to make scripts runnable and also importable.

This would be useful for writing modular components which can be played or tested independently.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.