ID : 600
SetPriority
Function
To set priority level of the own task.
Syntax
SetPriority priority level
Guaranteed entry
- Priority level
- Designate the priority level (-2 to 2) by integer type data.
Description
Priority of the own task is set.
The operational priorities of the tasks are determined by the priority level where +2 is the highest and -2 is the lowest.
| Priority level | Operational priorities of tasks |
|---|---|
| +2 | Highest |
| +1 | High |
| 0 | Normal |
| -1 | Low |
| -2 | Lowest |
Related Terms
Attention
-
Example
'!TITLE "Setting of Priority Level of Own Task"
' Acquire priority level of own task and display it on message output window
Sub Sample_SetPriority
Dim aaa As Integer
' Set priority level of own task as high
SetPriority 1
' Assign priority level of own task to aaa
aaa = GetPriority
' Display priority level of own task on the message output window
PrintDbg aaa
End Sub
ID : 600

