Set CL7="C:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\bin\cl.exe"
Set LINK7="C:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\bin\link.exe"
Set INC7="C:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\include"
Set LIB7="C:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\lib"
Set INCSDK="C:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\PlatformSDK\Include"
Set LIBSDK="C:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\PlatformSDK\Lib"
%CL7% lang_01.cpp /c /I%INC7% /I%INCSDK%
%LINK7% /LIBPATH:%LIB7% /LIBPATH:%LIBSDK% lang_01.obj
Imports System.Environment
Imports System.IO
Module MyModule
' ********************************************************' * 実行' ********************************************************
Sub Main()
' PATH 環境変数取得
Dim strEnv as String = GetEnvironmentVariable( "PATH" )
' 区切り文字定義
Dim delimStr As String = ";"
Dim delimiter As Char() = delimStr.ToCharArray()
' 配列定義
Dim split As String() = Nothing
' トークン分割
split = strEnv.Split( delimiter )
' ソート
Array.Sort( split, split.GetLowerBound(0), split.Length )
Dim strValue as String
' 書き込み
Try
Dim OutFile As StreamWriter = New StreamWriter("result.txt", false )
For each strValue In split
Call OutFile.WriteLine( strValue )
Next
OutFile.Flush()
OutFile.Close()
Catch e As Exception
Console.WriteLine("エラーの内容 : {0}", e.ToString())
End Try
End Sub
End Module