This repository has been archived by the owner on Apr 1, 2018. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Vmath.pas
55 lines (52 loc) · 1.49 KB
/
Vmath.pas
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
program Vmath;
uses sysutils,crt,io,lang,programStr,basic,equ,f;
// vmathui;
var
tmpString:String = '';
i,c:longint;
procedure console(lang:String);
begin
Window(1,1,120,255);
clrscr;
if lang='' then begin
writeln('Choose Your Language [Default is English]');
writeln('Chon ngon ngu [Mac dinh la Tieng Anh]');
write('(En | Vi) >> ');readln(tmpString);
ActiveLang(tmpString);
end
else ActiveLang(lang);
clrscr;
if ChkFile('vmath.cfg')=0 then ReadCfg;
write(LoadText);
clrscr;
writeln('===========================================');
writeln(' VMath Xplorer ');
writeln('===========================================');
write(WelcomeMsg);
RunFile('start.vmath',0);
repeat
write(#13#10#13#10,InputText,' >> ');readln(tmpString);
write(#13#10,OutputText,' >> ');
CmdProcess(tmpString);
until tmpString='exit';
end;
begin
Info;
if (paramstr(1)='-e') and (paramstr(2)<>'') then begin
c:=2;
if (paramstr(2)='-d') and (Str2Num(paramstr(3)).check=True) then
begin
dec:=Str2Int(paramstr(3)).value;
c:=4;
end;
for i:=c to ParamCount do tmpString:=tmpString+paramstr(i);
write('[VMath] >> ');Equation(tmpString);
end else
if (Paramstr(1)<>'') and (chkFile(paramstr(1))=0) then begin
writeln('[VMath] >> Processing . . .');
RunFile(paramstr(1),0);
end
else if (lowercase(Paramstr(1))='-en') then Console('en')
else if (lowercase(Paramstr(1))='-vi') then Console('vi')
else console('');
end.