外部変形は データのやり取りをテキストファイルで行うので プログラム言語は 自由に選ぶことができます。図形は機能的かつシンプルなため、数多くのユーザーに受け入れられています。
javaで線種を取得する(lt)
:javaで線種を取得する(lt)
@echo off
if not exist %~dp0Lt.class (
for /f "delims=:" %%n in ('findstr /n "^#!" %0') do (
more +%%n %0 > %~dpn0.java
javac -encoding shift_jis %~dpn0.java
)
)
copy jwc_temp.txt myfiles > nul
java -Dfile.encoding=shift_jis -classpath %~dp0 Lt > jwc_temp.txt
goto:eof
REM #jww
REM #e
#!この次の行からプログラムを書いてください
import java.io.*;
import java.util.regex.Pattern;
class Lt {
public static void main(String[] args) {
try {
BufferedReader f = new BufferedReader(new FileReader("myfiles"));
String line;
String lt, plt;
lt = plt = "";
while ( (line = f.readLine()) != null) {
if (Pattern.compile("^lt").matcher(line).find()) {
plt = line.substring(2);
if (lt.equals("") || lt.equals(null)) { lt = plt; }
continue;
}
}
f.close();
System.out.printf("h#lt=%s\n", lt);
} catch (IOException e) {
System.out.println(e);
}
}
}