StartSubName: Difference between revisions
Jump to navigation
Jump to search
New page: {{Description|description=This command begins the Sub Name mode. This command will clear the current output line, then redirect all subsequent output into a SubName buffer. After [[EndSubN... |
Modified code sample |
||
| (3 intermediate revisions by the same user not shown) | |||
| Line 1: | Line 1: | ||
{{Description|description=This command begins the Sub Name mode. This command will clear the current output line, then redirect all subsequent output into a SubName buffer. After [[EndSubName]] is called, the contents of the sub name buffer will be used as the file name for the next sub created with a call to [[OpenSub]].}} | {{Description|description=This command begins the Sub Name mode. This command will clear the current output line, then redirect all subsequent output into a SubName buffer. After [[EndSubName]] is called, the contents of the sub name buffer will be used as the file name for the next sub created with a call to [[OpenSub]].}} | ||
An [[EOL]] must be used to end the filename line. | |||
The standard use of this command is to allow each sub to reside in it's own text file, and to allow the post developer to name the output files according to the needs of the control. | |||
=Code Sample:= | |||
This code shows the use of StartSubName and [[EndSubName]], along with [[IncVar]] and [[GetVar#]] to set up a counter. | |||
<nowiki>IncVar('SubCounter') | |||
StartSubName | |||
ProgramFileTitle$ '.' GetVar#('SubCounter') EOL | |||
EndSubName | |||
OpenSub</nowiki> | |||
{{Stats|id=560|type=Command|class=All Machines|scope= Global|version=6.0}} | {{Stats|id=560|type=Command|class=All Machines|scope= Global|version=6.0}} | ||
[[Category:MTM]] | [[Category:MTM]] | ||
Latest revision as of 23:16, 13 February 2013
Description
This command begins the Sub Name mode. This command will clear the current output line, then redirect all subsequent output into a SubName buffer. After EndSubName is called, the contents of the sub name buffer will be used as the file name for the next sub created with a call to OpenSub.
An EOL must be used to end the filename line.
The standard use of this command is to allow each sub to reside in it's own text file, and to allow the post developer to name the output files according to the needs of the control.
Code Sample:
This code shows the use of StartSubName and EndSubName, along with IncVar and GetVar# to set up a counter.
IncVar('SubCounter')
StartSubName
ProgramFileTitle$ '.' GetVar#('SubCounter') EOL
EndSubName
OpenSub
Stats
ID 560 Type Command Class All Machines Scope Global Min Version 6.0