Illustration of a Visual Basic Program Running an Ada Program 1 by Richard Conn 11 September 1999
Illustration of a Visual Basic Program Running an Ada Program 2 Views Visual Basic Source Code Visual Basic Procedure Ada Source Code List of Files in the System’s Directory Starting the VB Program Result of Running the VB Program
Illustration of a Visual Basic Program Running an Ada Program 3 Visual Basic Source Code This is our Mainline form This text box contains the command line args for the Ada program This button causes this procedure to run
Illustration of a Visual Basic Program Running an Ada Program 4 Visual Basic Procedure This procedure is invoked when the associated button is pressed It was mostly comment (in green) with one function (one line of executable code): Shell “ECHOCL.EXE “ + txtAdaCommandArgs.text, vbNormalFocus SHELL command Name of Ada Executable followed by a space Name of Text Box Object Text attribute of the Text Box Ada program executes in a normal way
Illustration of a Visual Basic Program Running an Ada Program 5 Ada Source Code This program uses Ada.Command_Line to access the command line arguments It waits for a RETURN when done so you can see the result
Illustration of a Visual Basic Program Running an Ada Program 6 List of Files in the System’s Directory Executable of Ada Program Executable of Visual Basic Program Ada Source Code VB Source Code Only the Ada and VB Executable Programs (EXE Files) are Needed
Illustration of a Visual Basic Program Running an Ada Program 7 Starting the VB Program 1. User types in command line arguments for the Ada program here 2. User clicks on this button
Illustration of a Visual Basic Program Running an Ada Program 8 Result of Running the VB Program This window pops up and the output of the Ada program is observed Striking RETURN causes the ECHOCL window to disappear