OSDN Git Service

こっそり、気持ち程度の日本語化しました (UTF-8 / Windows 環境用)。
[ring-lang-081/annotated-ring-with-OmegaT.git] / target / ringlibs / stdlib / stdsystem.ring
1 # Ring 標準ライブラリ
2 # アプリケーション用の汎用関数とクラス
3 # 2016, Mahmoud Fayed <msfclipper@yahoo.com>
4
5 Load "stdfunctions.ring"
6 Load "stdbase.ring"
7 Load "stdlibcore.ring"
8
9 if IsMainSourceFile() 
10         system_class_test()
11 ok
12
13 func System_class_test
14         
15         oSystem = new System
16
17         See "Test the System Class Methods" + nl
18         
19         oSystem.system("dir")
20         see oSystem.sysget("path") + nl
21         see oSystem.ismsdos() + nl
22         see oSystem.iswindows() + nl
23         see oSystem.iswindows64() + nl
24         see oSystem.isunix() + nl
25         see oSystem.ismacosx() + nl
26         see oSystem.islinux() + nl
27         see oSystem.isfreebsd() + nl
28         see oSystem.isandroid() + nl
29         see oSystem.windowsnl() + nl
30         see oSystem.sysargv() + nl
31         see oSystem.filename() + nl
32
33
34 Class System
35  
36         Func system cCommand
37                 std_system(cCommand)
38
39         Func sysget cVariable
40                 return std_get(cVariable)
41
42         Func ismsdos
43                 return std_ismsdos()
44
45         Func iswindows
46                 return std_iswindows()
47
48         Func iswindows64
49                 return std_iswindows64()
50
51         Func isunix
52                 return std_isunix()
53
54         Func ismacosx
55                 return std_ismacosx()
56
57         Func islinux
58                 return std_islinux()
59
60         Func isfreebsd
61                 return std_isfreebsd()
62
63         Func isandroid
64                 return std_isandroid()
65
66         Func windowsnl
67                 return std_windowsnl()
68
69         Func sysargv
70                 return std_sysargv()
71
72         Func filename
73                 return std_filename()