Difference between revisions of "MC-Basic:VESEXECUTE"

From SoftMC-Wiki
Jump to: navigation, search
(Created page with '{{MC-Basic |SHORT FORM= |SYNTAX= <''string var name''> = VESExecute(<''string expression''>) |AVAILABILITY= Versions 3.7.x and higher |DESCRIPTION= Invocation of Basic interp…')
 
 
(6 intermediate revisions by 4 users not shown)
Line 1: Line 1:
 +
{{Languages|MC-Basic:VESEXECUTE}}
 
{{MC-Basic
 
{{MC-Basic
 
|SHORT FORM=
 
|SHORT FORM=
Line 7: Line 8:
  
 
|AVAILABILITY=
 
|AVAILABILITY=
Versions 3.7.x and higher
+
Since Version 3.7.x
  
 
|DESCRIPTION=
 
|DESCRIPTION=
 +
 
Invocation of Basic interpreter via virtual (internal) entry station.
 
Invocation of Basic interpreter via virtual (internal) entry station.
  
Pass to a string the virtual entry station (CLI) and get a response.  When VESEXECUTE is executed, it sends the command and waits for the response. While waiting for the response, it reads all the incoming messages from the VES message pipe. It discards all the non-relevant messages that it reads. This means that if an ASYNC message is printed to the VES message pipe while the VESEXECUTE command is waiting for the response, the user will never get this message since the VESEXECUTE deletes it. VESExecute returns the first 512 characters of the response string
+
Pass to a string the virtual entry station (CLI) and get a response.
 +
When VESEXECUTE is executed, it sends the command and waits for the response.  
 +
While waiting for the response, it reads all the incoming messages from the VES message pipe.  
 +
 
 +
It discards all the non-relevant messages that it reads.  
 +
This means that if an ASYNC message is printed to the VES message pipe while the VESEXECUTE command is waiting for the response, the user will never get this message since the VESEXECUTE deletes it.  
 +
 
 +
VESExecute returns the first 512 characters of the response string
 +
 
 +
;Return value
 +
: Response or Error message. Valid reply has prefix “D:”, while error response has prefix “E:”
  
Return value:      Response or Error message. Valid reply has prefix “D:”, while error response has prefix “E:”
+
=== Multi-line commands via entry station ===
 +
Short programs can be transferred via entry station as strings.  
 +
Multi-line program strings can be assembled by concatenation of single-line command strings.
 +
Each single-line string should be terminated by CRLF (carriage return - line feed) characters.
 +
 
 +
{{Note/Warning| Be careful using VesExecute statement, it activates a process on entry-station priority (2) which can mess with the execution of user programs. Aso note that calling VesExecute from another entry station is not allowed! }}
  
 
|TYPE=
 
|TYPE=
Line 33: Line 50:
 
|LIMITATIONS=
 
|LIMITATIONS=
 
Only from task context
 
Only from task context
 
Errors:                 N/A
 
  
 
|EXAMPLE=
 
|EXAMPLE=
?VESExecute(“dir *.prg”)<br>
+
?'"`UNIQ--pre-00000001-QINU`"'?
  
str1=VESExecute(“Load “+var2”)
+
;Example for a multi-line command
 +
?'"`UNIQ--pre-00000002-QINU`"'?
  
 
|SEE ALSO=
 
|SEE ALSO=
* [[Axystems:MC-Basic:VESMESSAGE|VESMESSAGE]]
+
* [[MC-Basic:VESMESSAGE|VESMESSAGE]]
  
  
 
}}
 
}}

Latest revision as of 08:17, 27 April 2021

Language: English  • 中文(简体)‎

Invocation of Basic interpreter via virtual (internal) entry station.

Pass to a string the virtual entry station (CLI) and get a response. When VESEXECUTE is executed, it sends the command and waits for the response. While waiting for the response, it reads all the incoming messages from the VES message pipe.

It discards all the non-relevant messages that it reads. This means that if an ASYNC message is printed to the VES message pipe while the VESEXECUTE command is waiting for the response, the user will never get this message since the VESEXECUTE deletes it.

VESExecute returns the first 512 characters of the response string

Return value
Response or Error message. Valid reply has prefix “D:”, while error response has prefix “E:”

Multi-line commands via entry station

Short programs can be transferred via entry station as strings. Multi-line program strings can be assembled by concatenation of single-line command strings. Each single-line string should be terminated by CRLF (carriage return - line feed) characters.

WARNING.svgWARNING
Be careful using VesExecute statement, it activates a process on entry-station priority (2) which can mess with the execution of user programs. Aso note that calling VesExecute from another entry station is not allowed!

Syntax

<string var name> = VESExecute(<string expression>)

Availability

Since Version 3.7.x

Scope

Task

Limitations

Only from task context

Examples

?'"`UNIQ--pre-00000001-QINU`"'?

Example for a multi-line command

?'"`UNIQ--pre-00000002-QINU`"'?

See Also