For UNIX: Not Supported
BASIC object code can be exported to a DOS file with a .D3F extension, and then combined with a launcher to turn it into an executable that can be run directly from a Windows command prompt. It is also possible to configure Windows to recognize the .D3F extension as an executable and associate it with the Flash interpreter (see Notes below), which makes the Flash module significantly smaller.
BASIC modules can be run from a Windows command prompt and from any machine in a D3 domain. It does not require that a VME or FSI service is running on the same machine. Only one user license is consumed per workstation, even if multiple BASIC modules are run from a Windows command prompt.
If the module does not need to use the VME service (no execute, oconv, and so on), then the module is not automatically logged into the VME service. If the module does need access to the VME, it is automatically logged in to the VME service using a user-ID identical to the Windows user name, but appended with an underscore. The VME account that the user is logged in to is specified by the -d switch.
To run a FlashBASIC Module from a Windows Command Prompt:
Compile and export the module (the (f option uses the floating point chip for faster execution):
compile bp mymodule (ofg |
Do one of the following:
Run the module:
d3flash –f mymodule |
Make an EXE and run the EXE:
d3flash –e –f mymodule mymodule |
NOTE |
|
To instruct Windows to recognize the .D3F file as an executable:
Add the D3F extension to the pathtext variable:
set pathtext=%pathtext%;.d3f |
Run the assoc command to associate the D3F extension to D3FLASH:
assoc .d3f=d3flash |
Run the ftype command to specify how to run it:
ftype D3Flash=d3flash.exe -f %1 -a "%*" |
The D3Programs directory must be in the path, or use an explicit path in the ftype command.
The d3flash utility is a DOS command that allows the launching of BASIC modules from a Windows command prompt. This launcher can be, in Windows, associated to the D3F extension and invoked automatically, thus making the D3F executable.
D3flash {options} |
options |
||||
-a args |
Specifies the arguments that can be retrieved by a tclread statement. More than one -a switch can be present, in which case all tokens are concatenated with one space between each of them. If there are spaces in the arguments, surround the arguments with double quotes. The -a option is ignored if used with the -e option. Passing double-quotes in the string To pass double-quotes in your string arguments, the double-quotes you want passed must be preceded (escaped) by a \ (backslash character). Consider the program below:
The example below illustrates passing a single word parameter enclosed in quotes.
The example below illustrates passing a multiple word parameter enclosed in quotes.
|
|||
-d database |
Specifies the default database in which the module will run. This database name is used when doing an execute or requiring some VME support, and to determine where files are when trying to open them without an explicit path. If there is no -d switch, the Windows environment variable %D3DATABASE% is used. If this variable is not specified, the module must use only explicit file names, and will log on to FSI:DM if a VME service is needed. |
|||
-n domain |
Specifies the D3 domain in which the module will run. If there is no -n switch, the Windows environment variable %D3DOMAIN% is used. If this variable is not specified, the module is run in the default domain. |
|||
-e {outfile{.exe}} |
Converts the module into an EXE. If not specified, the module name, stripped of the .D3F extension, is used. Note that the -t, -d, and -n switch settings are retained in the .EXE which is produced. The -a, -h and -r options are ignored if used with the -e option. |
|||
-f {module{.d3f }} |
Specifies the module to run or to use to make the .EXE. |
|||
-h |
Help message. The -h option is ignored if used with the -e option. |
|||
-t |
Use Telnet I/Os. A Telnet client is spawned as soon as the module does a print or input statement. The Telnet client is closed as soon as the module terminates. If this option is not used, all I/Os are directed to the Windows command prompt console. |
|||
-r |
Run (default). The -r option is ignored if used with the -e option. |