User Tools


reference:subprogram

Subprogram

XSUBSCREEN DisplayOffsetX,DisplayOffsetY,Width,Height

Specify the display size of the subprogram display

・This command has meaning only within subprograms. Nothing happens when used from the main program or direct mode.
・The subprograms cannot show the display until this command is executed.
・XSUBSCREEN is a command to set the outline of the sub screen, and the BASIC display resolution in it must be set separately with XSCREEN.

Arguments

DisplayOffsetX,DisplayOffsetY

Display offset on the main display of the sub display: -32768 to 32767

Width,Height

Display size of the sub display

・Width: 1 to 1280
・Height: 1 to 720

XSUBSCREEN 0

Stop displaying the subprogram screen

・This command has meaning only within subprograms. Nothing happens when used from the main program or direct mode.
・When this command is executed, the subprogram disappears from the display.

Argument

0

Specify 0 for the argument to turn off the indication.

XSUBSCREEN OUT DisplayOffsetX,DisplayOffsetY,Width,Height

Get the display offset of the subprogram display

・This command has meaning only within subprograms. When used from the main program or direct mode, 0,0 is returned.

Return Value

DisplayOffsetX,DisplayOffsetY

Display offset on the main display of the sub display

Width,Height

Display size of the sub display

ENVSTAT Status

Set the status of the main interpreter

・This command has meaning only within subprograms. Nothing happens when used from the main program or direct mode.

Argument

Status

Main interpreter status to be set

・Only 0 can be specified.
・It is not set when the current status is 3 or 4.

ENVSTAT()

Get the status of the main interpreter

Return Value

0 Waiting in Direct Mode
1 Execution Suspended
2 Execution Stopped Due to Error
3 Running Program
4 Editing Program

ENVSTAT OUT Status,ExecutionSlot,EditSlot

Get the status of the main interpreter

Return Value

Status

0 Waiting in Direct Mode
1 Execution Suspended
2 Execution Stopped Due to Error
3 Running Program
4 Editing Program

ExecutionSlot

Current execution slot

EditSlot

Current edit slot

ENVSTAT OUT Status,ErrorNumber,ErrorArgumentNumber,ErrorSlot,ErrorCharacterPosition,ErrorLine

Get the status of the main interpreter

Return Value

Status

0 Waiting in Direct Mode
1 Execution Suspended
2 Execution Stopped Due to Error
3 Running Program
4 Editing Program

ErrorNumber

If an error has occurred, a value other than 0 is returned.

ErrorArgumentNumber

If the argument that occurred when the error occurred is known, a positive value is returned.

ErrorSlot

If an error has occurred, the program slot that occurred is returned.

ErrorCharacterPosition

If an error has occurred, the character position from the beginning of the generated source code is returned.

ErrorLine

If an error has occurred, the line number in the source code that occurred is returned.

ENVLOAD 0,MainID,SubID

Copy the contents of the program slot on the main interpreter to the program slot on the sub interpreter side

・This command is valid only in the sub interpreter.

Arguments

0

Specify 0 when copying a program slot

MainID

Program slot ot the copy source main interpreter

SubID

Program slot of the copy destination sub interpreter

ENVLOAD 1,MainID,SubID

Copy graphic page data on the main interpreter to the sub interpreter

・This command is valid only in the sub interpreter.

Arguments

1

Specify 1 when copying graphic page

MainID

Graphic page of the copy source main interpreter

SubID

Graphic page of the copy destination sub interpreter

ENVLOAD 2,MainID,SubID

Copy the SPDEF definition on the main interpreter to the sub interpreter side

・This command is valid only in the sub interpreter.

Arguments

2

Specify 2 when copying SPDEF definitions

MainID

SPDEF definition number of the copy source main interpreter

SubID

SPDEF definition number of the copy destination sub interpreter

ENVSAVE 1,SubID,MainID

Copy graphic page data on the sub interpreter to the main interpreter

Arguments

1

Specify 1 when copying graphic page

SubID

Graphic page of the copy source sub interpreter

MainID

Graphic page of the copy destination main interpreter

ENVSAVE 2,SubID,MainID

Copy the SPDEF definition on the sub interpreter to the main interpreter

Arguments

2

Specify 2 when copying SPDEF definition

SubID

SPDEF definition number of the copy source sub interpreter

MainID

SPDEF definition number of the copy destination main interpreter

ENVINPUT$([HistoryNumber])

Get the contents of console input line or input history of main interpreter

Argument

HistoryNumber

Number of input history to get. The larger the history, the more historical it will be: (0 to 32)

・If 0 is specified, the console line currently being input is acquired instead of the history.
・0, if not specified.

Return Value

Content string of input line or specified input history

ENVTYPE()
ENVTYPE OUT Type,Parameter

Get the interpreter on which the currently running program is operating

Return Value

Type

Interpreter type

0 Main Interpreter
1 Sub Interpreter
2 UI Interpreter

Parameter

Parameter set at startup

・Programs that can be created by the user always return -1.

ENVFOCUS Flag

Get and transfer focus

Argument

1 to get focus, 0 to transfer focus

ENVFOCUS()

Get focus status

Return Value

Whether it has focus

・If it has, it returns 1. If it does not, it's 0.

ENVPROJECT

Synchronize the sub interpreter work project with the main interpreter work project

PUSHKEY String

It is assumed that the specified string has been entered from the keyboard.

Argument

String

Input string

・Maximum 64 characters

HELPINFO OUT CommandNameString,NumericArray

Information of help data at the cursor position

・Command for internal use only. Do not use.

Return Value

CommandNameString

String of command name at the cursor position

・If there is no command name, "DEFAULTHELPKEY" is returned.

Array

An array that returns the number of rows

・The number of elements in the array is the number of pages.

HELPINFO CommandNameString OUT NumericArray

Help data information for command names

・Command for internal use only. Do not use.

Argument

CommandNameString

String of command name to get

Return Value

Array

An array that returns the number of rows

・The number of elements in the array is the number of pages.

HELPGET CommandNameString,PageNumber OUT LineStringArray,TagArray,AttributeNumericArray,CodeExampleString

Get help data

・Command for internal use only. Do not use.

Arguments

CommandNameString

String of command name to get

PageNumber

Page number to get

LineNumber

Line number to get

Return Value

LineStringArray

Each value is a string of one line

・The array size is the number of lines.

TagArray

The tag for each value is a number of indentations and color information.

・When HEAD is included in the internal information, it becomes a headline, and it is used for moving between headlines with PAGEUP/DOWN.
・The array size is the number of lines.

Value Description
0 Basic Line
1 You can see it by scrolling the title
2 Argument Headlines
3 Return Value Headlines
4 Other Headlines
5 Description directly under the title
6 Argument Subheadings
7 Return Value Subheadings
8 Other Subheadings

AttributeNumericArray

Attribute information for a specific string in a line

・The array is a 3D array, and the size of the array is the number of rows, the number of attributes per row, and the attribute number.
・Reference: ARRAY#(NumberOfRows,NumberOfAttributesPerRow,AttributeType)
・When the attribute number is 0 (position) and the acquired value is negative, each attribute information is invalid.

Index Description
0 Position
1 Length from Position
2 Color

・As the corresponding attribute increases, the structure in the array may change.

CodeExampleString

Code example string

reference/subprogram.txt · Last modified: 2020/08/24 12:17 (external edit)

Page Tools