調用在VB 6應用子例程或函數我想使簡單的應用程序,其具有1種方法和在它2個參數和 應用程序可以通過控制檯啓動/ CMD是這樣的:經由控制檯
name_of_app.exe name_of_method param1 param2
例如: 我有一個名爲myApp.exe
一個應用程序,有一個像這樣
Module Module1
Sub Main()
Console.WriteLine("Hello World!")
Dim x As Integer, y As Integer
Dim total As Integer
x = Console.ReadLine()
y = Console.ReadLine()
total = plus(x, y)
Console.WriteLine("result: " & total)
Console.ReadLine()
End Sub
Private Function plus(ByVal x As Integer, ByVal y As Integer) As Integer
Return x + y
End Function
End Module
所以在控制檯的方法/ CMD我就是這樣調用
該功能myApp.exe plus 3 2
我該如何做到這一點?
我已經做了一個模塊,這樣下面到目前爲止 –