Including Other Files
You should consider breaking all but the smallest of volumes
into multiple files. The [include] tag allows
one .sage file to include the contents of another.
For example…
[volume Threads and Fibers aka Threading]
[include Overview]
[topic Fibers]
[include Fibers_Overview]
[include Fibers_Cycles]
[include Fibers_Aborting]
[include Fibers_Properties]
[end]
[topic Threads]
[include Threads_Overview]
[topic Coordinating Threads aka Threads.Coordinating]
[include Threads_VsFibers]
[include Threads_CriticalSection]
[end]
[topic Background Tasks aka BGTasks]
[include Threads_BGTasks]
[include Threads_DSSchedule]
[include Threads_ITaskRunner]
[end]
[include Threads_FirstTrust]
[end]
[end]
As you can see, this approach allows you to focus on the
organization of topics and articles within the volume.
The articles are each kept in separate files
(though larger articles could span multiple files).
As shown above, you may omit the file extension.
Moreover, Sage requires all source files to use the .sage
extension.
You may specify this extension in include statements,
but it is preferred to omit the extension.
DSEdit's
Code Insight for Sage
files offers suggestions for [include] tags.
For example…
Relative paths are resolved from the location of the including file.
For example, if the file C:\Docs\Sage\Main.sage has the statement:
[include Details\Info], this refers to the file
C:\Docs\Sage\Details\Info.sage .
Similarly, the statement:
[include ..\Overview] refers to the file
C:\Docs\Overview.sage .
⏱ Last Modified: 10/24 10:44:32 am