自编5800万能程序.docx
《自编5800万能程序.docx》由会员分享,可在线阅读,更多相关《自编5800万能程序.docx(15页珍藏版)》请在冰豆网上搜索。
![自编5800万能程序.docx](https://file1.bdocx.com/fileroot1/2022-11/29/9f56bbe1-a357-4c8d-9424-3f606980c80f/9f56bbe1-a357-4c8d-9424-3f606980c80f1.gif)
自编5800万能程序
5800万能程序
程序名:
数字0
ClrStat:
ClrMat:
Clrvar:
40DimZ:
Norm2:
Do:
”(XY=1,ZD=2,GC=3,GD=4,BP=5,FM=6,ZP=7,JS=8,SD=9)====>QINGAN1-9”:
GetkeyZ[3]:
WhileZ[3]=35:
Prog”1XY”:
WhileEnd跳行
WhileZ[3]=36:
Prog”2ZD”:
WhileEnd跳行
WhileZ[3]=37:
Prog“3GC”:
WhileEnd跳行
WhileZ[3]=21:
Prog“4GD”:
WhileEnd跳行
WhileZ[3]=22:
Prog“5BP”:
WhileEnd跳行
WhileZ[3]=23:
Prog“6FM”:
WhileEnd跳行
WhileZ[3]=31:
Prog“7ZP”:
WhileEnd跳行
WhileZ[3]=32:
Prog“8JS”:
WhileEnd跳行
WhileZ[3]=33:
Prog“9SD”:
WhileEnd:
LpwhileZ[3]≠25:
Cls:
”XIEXIESHIYING”:
”QQ:
13119703跳行结束。
程序名:
数字01
ClrStat:
ClrMat:
Norm2:
Do:
”(BH:
B6=1,B7=2,B8=3,B9=4)==================>QNINAN1-4”:
GetkeyZ[3]跳行
WhileZ[3]=35:
Prog“B6”:
WhileEnd跳行
WhileZ[3]=36:
Prog“B7”:
WhileEnd跳行
WhileZ[3]=37:
Prog“B8”:
WhileEnd跳行
WhileZ[3]=21:
Prog“B9”:
WhileEnd:
LpwhileZ[3]≠25结束。
程序名:
02ZD
Cls:
prog”QX”:
Do:
Z[6]X:
”X0+Y0i”?
X:
X=-1=>Stop:
X=-2=>Break:
XZ[6]:
Prog”B”:
Prog”H”:
Prog”ZD”:
”H=”:
Locate6,4,H▲LpwhileX≠-1结束
程序名:
1DAOXIAN
Lbi0:
Norm2:
”ZJ.(X+Yi)”?
F:
”HS.(X+Yi)”?
H:
Arg(H-FC:
IfC<0:
ThenC+360C:
IfEnd:
Fix4:
”HS.S=”:
Locate6,4,Abs(H-F):
跳行
LbiA:
”HS.=>”:
C◆DMS▲
“LJ”?
V:
V+CK:
K≥360=>K-360K:
”QS.=>”:
K◆DMS▲
?
S:
F+S(cosK+isinKW:
”QSZB(X+Yi)=”:
W▲
1Q:
”LXTSZB(LX≠0)”?
Q:
Q=0=>Goto0:
WF:
KC:
IfC≥180:
ThenC-180C:
EIseC+180C:
IfEnd:
C≥360=>C-360C:
GotoA结束。
程序名:
1SC
CIrMemory:
Norm2:
”H0”?
H:
LbiX:
”H-S”?
A:
H+AB:
”Q-S”?
C:
IfC=0:
Then”YQG=”:
B▲
Goto0:
EIseB-CH:
”H1”:
H▲
GotoX:
Lbi0:
”Q-S”?
C:
IfC<0:
ThenB+CH:
GotoX:
EIseGoto1:
Lbi1:
B-CH:
”HD=”:
H▲
“HG”?
G:
”H-G=”:
G-H▲
Goto0结束。
程序名:
1SC-4
Lbi0:
“HX=”?
P:
PW:
1V:
“K:
4.787=1,4.687=2”?
V:
0Q:
IfV=1:
Then4.787K:
EIse4.687K:
IfEnd:
Lbi1:
“S-X”?
A:
A=-1=>Goto5:
“S-S”?
B:
IfAB=0:
Then“H-Z”?
C:
Abs(C-B-A)×200S:
“SL=”:
S▲
Goto2:
IfEnd:
100(B-A)S:
“SL=”:
S▲
(A+B)÷2C:
“H-Z”?
C:
C=0=>Goto1:
Lbi2:
K+CD:
“H-H”?
D:
(C+K-D)×1000I:
“H-I=”:
I▲
Ifk<4.7:
Then4.787K:
EIse4.687k:
IfEnd:
Lbi3:
“Q-X”?
E:
“Q-S”?
F:
IfEF=0:
Then“Q-Z”?
G:
Abs(G-F-E)×200T:
“QL=”:
Locate6,4,T:
“S-Q=”Locate6,4,S-T▲
Goto4:
IfEnd:
100(F-E)T:
“QL=”:
Locate6,4,T:
“S-Q=”:
Locate6,4,S-T▲
(E+F)÷2G:
“Q-Z”?
G:
G=0=>Goto3:
Lbi4:
G+KL:
“Q-H”?
L:
L=0=>Goto3:
(G+K-L)×1000J:
“Q-I=”:
J▲
C-GM:
D-LN:
(J-I)÷2O:
M+O÷1000H:
“HQ-Z=”:
Locate6,4,M:
“HQ-H=”:
Locate6,4,N:
“HQ-I=”:
Locate6,4,O:
“HI=”:
Locate6,4,H▲
P+HP:
Q+1Q:
Goto1:
Lbi5:
“N=”:
Locate6,4,Q:
“NI=”:
Locate6,4,P-W:
“HN=”:
Locate6,4,P▲
0Y:
“Y:
ZH=0,CL=1”?
Y:
Y=0=>Goto1:
Goto0:
程序名:
1XY
CIs:
Prog“DX”:
Prog“QX”:
90A:
“PJ1+PJ2i”?
A:
ReP(AZ[1]
:
ImP(AZ[9]:
Do:
Z[11]B:
“KM+-Di”?
B:
BZ[11]:
ImP(BD:
ReP(BZ:
Prog“X1”:
Z=-1=>Stop:
Z=-2=>Break:
0L:
IfZ[9]≠0:
Then“L0”?
L:
L÷sin(Z[9]L:
IfEnd:
LZ[10]:
Prog“A”:
Z[2]+Z[1]A:
A-Z[9]B:
I+Dcos(A)+Z[10]×cos(BX:
J+Dsin(A)+Z[10]×sin(BY:
X+YiZ[6]:
Prog“XY”:
Prog“JS”:
LpwhiIeZ≠-1
程序名:
1XY—JD
LbI0:
“JDKM”?
O:
“JDX”?
U:
“JDY”?
V:
“LS1”?
H:
HN:
“LS2”?
N:
?
R:
“ZJ”?
P:
0G:
“FWJ”?
G:
HX:
Prog“AB”:
AC:
BD:
NH:
Prog“AB”:
Abs(PE:
(R+C)tan(E÷2)-(C-A)÷sin(E)+DT:
(R+A)tan(E÷2)+(C-A)÷sin(E)+BF:
XH:
∏R×Abs(P)÷180+H÷2+N÷2S:
(R+C)÷cos(E÷2)-RE:
Fix3:
“T1=”:
Locate6,4,T:
“T2=”:
Locate6,4,F:
“EH=”:
Locate6,4,E:
“LH=”:
Locate6,4,S▲
“ZHKM=”:
Locate6,4,O-T:
“HYKM=”:
Locate6,4,O-T+H:
“YHKM=”:
Locate6,4,O-T+S-N:
“HZKM=”:
Locate6,4,O-T+S▲
LbI1:
Prog“DX”:
90A:
“PJ1+PJ2i”?
A:
ReP(AZ[1]:
ImP(AZ[9]:
LbI2:
Z[11]B:
“KM+Di”?
B:
BZ[11]:
ReP(BZ:
ImP(BD:
Z=-1=>Goto0:
Z=-2=>Goto1:
0L:
IfZ[9]≠0:
Then“L0”?
L:
L÷sin(Z[9]L:
IfEnd:
LZ[10]:
Prog“A”:
Z[2]+Z[1]A:
A-Z[9]B:
I+Dcos(A)+Z[10]×cos(BX:
J+Dsin((A)+Z[10]×sin(BY:
X+YiZ[6]:
Prog“XY”:
Prog“JS”Goto2结束。
程序名:
1XY—S
LbI0:
0I:
0Q:
Norm2:
“X1”?
X:
“Y1”?
Y:
XA:
YB跳行
Do:
Do:
“XN”?
E:
“YN”?
F:
Q+(Y+F)(E-X)÷2Q:
EX:
FY:
I+1I:
LpwhileA≠E:
LpwhileB≠F:
Fix1:
“S=”:
Locate6,4,Abs(Q):
“N=”:
Locate6,4,I▲Goto0结束。
程序名:
2L—XY
Norm2:
Cls:
“L1-X1”?
A:
“L1-Y1”?
B:
“L1-X2”?
C:
“L1-Y2”?
D:
“L2-X1”?
E:
“L2-Y1”?
F:
“L2-X2”?
G:
“L2-Y2”?
H跳行
D-BI:
A-CJ:
AI+BJK:
H-FM:
E-GN:
EM+FNL:
IN-JMO:
(KN-JL)÷OX:
(IL-KM)÷OY:
Fix3:
“JDX=”:
Locate6,4,X:
“JDY=”:
Locate6,4,Y▲
程序名:
2ZD
LbIX:
Cls:
1A:
“ZD=1,ZDHI=2”?
A:
AZ[7]:
Prog“QX”:
90A:
IfZ[7]=1:
Then90Z[1]:
Goto0:
IfEnd跳行
“YOJ”?
A:
AZ[1]:
0B:
“M-H”?
B:
BZ[9]:
“DK-KM”?
Z:
LbI0:
Z[6]X:
“X0+Y0i”?
X:
X=-1=>Stop:
X=-2=>GotoX:
XZ[6]:
ImP(XY:
ReP(XX:
Z[8]M:
IfZ[7]=2:
Then“M0=”?
M:
MZ[8]:
IfEnd跳行
0D:
Do:
Z+DZ:
Prog“X1”:
Prog“A”:
Pol(X-I,Y-J+x10-9:
J-Z[2]J:
I(cos(J)-sin(J)tan(90-Z[1]))D:
Isin(J+90-Z[1])S:
IfM≠0:
ThenPol(M-WS,D:
JM∏÷180D:
IfEnd:
LpwhileAbs(D)>0.001:
Z+DZ:
SD:
IfZ[7]=1:
ThenProg“ZD”▲
Goto0:
IfEnd跳行
DP:
ZO:
IfZ[1]≠90:
ThenD×sin(Z[1]E:
∫(D²-E²)F:
ED:
D≠0=>D÷Abs(DW:
IfZ[1]<90:
ThenZ+WFZ:
ElseZ-WFZ:
IfEnd:
IfEnd跳行
Prog“H”:
PD:
OZ:
Z[1]A:
Z[8]M:
Prog“ZD”:
“J=H=”:
Locate3,4,A:
Locate11,4,H-Z[9]:
“M=I=”:
Locate3,4,M:
Locate11,4,H-Z[9]-M▲
Goto0结束。
程序名:
3GC
LbIX:
Cls:
Prog“QX”:
1A:
“SG=1,SZ=2,CZ=3”?
A:
AZ[7]:
0B:
IfA=2:
Then“YQG=”?
B:
BZ[10]:
IfEnd:
0A:
“H-B”?
A:
AZ[9]:
90C:
“PJ”?
C:
CZ[1]:
Do:
Do:
Z[11]B:
“KM+-Di”?
B:
BZ[11]:
ImP(BD:
ReP(BZ:
Z=-1=>Stop:
Z=-2=>GotoX:
0F:
DP:
0D:
Prog“H”:
H-Z[9]X:
PD:
IfZ[1]≠90:
ThenDXsin(Z[1]E:
∫(D²-E²)F:
ED:
IfEnd跳行
D≠0=>D÷Abs(DW:
IfZ[1]﹤90:
ThenZ+WFZ:
EIse
Z-WFZ:
IfEnd跳行
Prog“H”:
H-Z[9]H:
D≠0=>(H-X)÷(Abs(P)-(K÷sin(Z[1]+x10-9)I:
Fix3:
IfZ[7]=1:
Then“H=”:
Locate6,4,H:
“I=”:
Locate6,4,I▲
IfEnd:
:
LpwhiIeZ[7]=1:
IfZ[7]=2:
Then:
“QSDS”?
K:
Z[10]-KP:
EIseIfZ[7]=3:
ThenZ[8]M:
“M0”?
M:
MZ[8]:
MP:
IfEnd:
IfEnd跳行
“H=”:
Locate6,4,H:
“I=”:
Locate6,4,I:
“HM=”:
Locate6,4,P:
“TW=”:
Locate6,4,H-P▲
LpwhiIeZ[7]=2Or3:
结束。
程序名:
4GD
ClS:
Prog“QX”:
Do:
“KM”?
Z:
Z=-1=>Stop:
Z=-2=>Break:
-1D:
Prog“C”:
LP:
1D:
Prog“C”:
Fix3:
“LGD=”:
Locate7,4,P:
“RGD=”:
Locate7,4,L▲
LpwhiIeZ≠-1结束。
程序名:
5BP
ClS:
Prog“QX”:
0.5B:
“TH-GD”?
B:
BZ[7]:
Do:
Z[6]X:
“X0+Y0i”?
X:
X=-1=>Stop:
X=-2=>Return:
XZ[6]:
Z[8]M:
“M0”?
M:
MZ[8]:
Prog“B”:
DP:
Prog“C”:
IfD<0:
Then0.75-LD:
EIseL-0.75D:
IfEnd:
Prog“H”:
H-0.03-Z[8]G:
IZ[12]:
Prog“WS”:
S+Z[7]S:
Fix2:
PD:
Abs(D)-SO:
Fix2:
“LX=”:
Locate6,4,O:
Prog“ZD”:
“TW==”:
Locate4,4,G:
ProgL1”:
IfG﹤0:
ThenG-VT:
EIseG-V+0.03+(S-L+0.75)Z[12]T:
IfEnd:
跳行
Locate11,4,T▲
LpwhiIeX≠-1结束。
程序名:
6FM
ClS:
1A:
“JLFY=1,BGFY=2”?
A:
AZ[7]:
0.5B:
A=2=>“FKZ”?
B:
BZ[8]:
Prog“DX”:
Prog“QX”:
0A:
“KM=>”?
A:
AZ[9]:
Do:
Z[11]+Z[9]B:
IfZ[7]=1:
Then“KM+-Di”?
B:
EIse“KM+-M0i”?
B:
IfEnd:
BZ[11]:
ImP(BD:
Z[7]=2=>DZ[10]:
ReP(BZ:
Z=-1=>Stop:
Z=-2=>Break:
IfZ[7]=2AndD≠0:
ThenProg“C”:
LZ[12]:
IfD<0:
Then-L+0.75D:
EIseL-0.75D:
IfEnd:
Prog“H”:
Z[12]L:
H-Abs(Z[10])G:
Prog“WS”:
(S+Z[8])×(Z[10]÷Abs(Z[10]))D:
IfEnd:
Prog“X1”:
Prog“A”:
Z[2]+90A:
I+Dcos(AX:
J+Dsin(AY:
Prog“XY”:
Prog“JS”:
Abs(Z[10]M:
“M0”?
M:
(M-Abs(Z[10]))×1.5L:
MZ[10]:
Prog“H”:
Prog“L1”:
Fix2:
IfZ[7]=2AndD≠0:
Then“LX=”:
Locate6,4,L:
“D=”:
Locate6,4,D:
IfEnd:
“TW==”:
Locate4,4,H-Z[10]:
Locate11,4,H-Z[10]-V▲LpwhiIeZ≠1结束。
程序名:
7ZP
ClS:
Prog“DX”:
Prog“QX”:
90A:
“YPJ”?
A:
AZ[1]:
Z[11]A:
“ZKM+-MDi”?
A:
AZ[11]:
ReP(AZ:
ImP(AD:
Abs(D)O:
O+0.5iP:
“MR+GZi”?
P:
ImP(PZ[10]:
ReP(PP:
Prog“C”:
LZ[7]:
IfD﹤0:
Then–L+0.75D:
EIseL-0.75D:
IfEnd跳行
Prog“H”:
H-0.03Z[12]:
Z[12]-OO:
Z[12]-PP跳行
IfO﹥8:
Then(O-8)×1.75+14U:
EIse1.5×OU:
IfEnd跳
IfP﹥8:
Then(P-8)×1.75+14V:
EIse1.5×PV:
IfEnd跳
U+Z[10]Z[9]:
V+Z[10]Z[10]:
ZZ[8]:
Do:
Z[10]Y:
“S0:
SZH+,DZH-“?
Y:
Y=-1=>Stop:
Y=-2=>Break:
√(Z[9]²×(1-Y²÷Z[10]²))X:
X+Z[7]X:
Z[8]+YZ:
IfD﹥0:
ThenXD:
EIse–XD:
IfEnd:
D÷sin(Z[1]D:
Prog“X1”:
Prog“A”:
Z[2]+Z[1]A:
I+Dcos(AX:
J+Dsin(AY:
Prog“JS”:
“M0”?
M:
Prog“L1”:
Z[12]-MT:
“TW==”:
Locate4,4,T:
Locate11,4,T-V:
LpwhiIeY≠1结束。
程序名:
8JS
ClS:
Prog“DX”:
Do:
Z[6]X:
“X+Yi”?
X:
X=-1=>Stop:
X=-2=>Break:
XZ[6]:
ImP(XY:
ReP(XX:
Prog“JS”:
LpwhiIeX≠1结束。
程序名:
9SD
ClS:
Prog“QX”:
Prog“SD0”:
WZ[12]:
0.5A:
“CQHD”?
A:
AZ[7]:
1A:
“XY-LX=1,KM-XY=2”?
A:
IfA=1:
ThenGoto1:
EIseProg“DX”:
Goto2:
IfEnd跳行
Lbi1:
Z[6]X:
“X0+Y0i”?
X:
X=-1=>Break:
X=-2=>Stop:
Z[8]M:
“M0”?
M:
MZ[8]:
XZ[6]:
Prog“B”:
DZ[9]:
0D:
Prog“H”:
Z[9]+Z[14]V:
H-Z[15]-Z[8]W:
Z[13]+16N:
Z[13]×6+16B:
IfV≤0:
Then1C:
EIse-1C:
BN:
IfEnd跳行
IfW≥0:
ThenN+5CN:
GotoV:
IfEnd跳行
N+(Z[13]÷2×5)CA:
If-W≥-Z[A+2]:
ThenAN:
GotoV:
IfEnd跳行
While-W﹥-Z[N+2]:
N+5CN:
WhileEnd:
LbiV:
C=1=>N-5N:
Z[N]Q:
Z[N+1]E:
Z[N+2]F:
Z[N+3]G:
Z[N+4]R:
(Z[N+5]-Q)÷2L:
0I:
Do:
L+IL:
90L÷∏÷RP:
IfP﹥0.01:
Then2R×sin(PS:
EIseLS:
IfEnd:
G+PO:
E+Scos(OA:
F+Ssin(OB:
O+PZ[2]:
Pol(V-A,W-B+X10-9:
J-Z[2]J:
Isin(JD:
Icos(JI:
IfR≠1×1045:
ThenPol(R-D,I:
JR∏÷180I:
IfEnd:
LpwhiIeAbs(I)﹥0.001:
-Z[7]-DL:
Z[9]D:
Fix3:
“LX=”:
Locate6,4,L:
Prog“
ZD”:
“H0=”:
Locate6,4,Z[8]-H▲Prog“SD”:
C=0=>Goto1:
-A-Z[7]A:
B-Z[7]B:
Cls:
Fix3:
“﹤=LD=”:
Locate6,1,A:
“=﹥RD=”:
Locate6,2,B▲
Goto1
Lbi2:
“KM=”?
Z:
0D:
Prog“H”:
Z[8]M:
“M0=”?
M:
H-Z[15]-MW:
0V:
Prog“SD”:
IfC=0:
Then“CHAOCHU”:
Stop:
IfEnd跳行
Z[13]+16+Z[13]÷2×5N:
W-Z[N+2]+Z[7]E:
W-Z[7]W:
-A-Z[7]A:
B-Z[7]B:
Cls:
Fix3:
“UP=”:
Locate6,1,E:
“DOWN=”:
Locate6,2,W:
“﹤=LD=”:
Locate6,3,A:
“=﹥RD=”:
Locate6,4,B▲
AZ[9]:
BZ[10]:
Lbi3:
0F:
“KM=0,L=1,R=2”?
F:
F=0=>Goto2:
IfF=1:
ThenZ[9]-Z[14]D:
Else-Z[10]-Z[14]D:
IfEnd跳行
Prog“X1”:
Prog“A”:
Z[2]+90A:
I+Dcos(AX:
J+Dsin(AY:
Prog“XY”:
Prog“JS”:
Goto3结束。
程序名:
9XY—XY
“NEW(0),OLD(≠0)=”?
N跳行
N≠0=>Goto0跳行
“X1+Y1i=”?
A:
“X2+Y2i=”?
B:
“XO1+YO1i=”?
C:
“XO2+YO2i=”?
D:
(C-D)÷(A-B)F:
C-FAE:
“SCALE=”:
Abs(F)▲
“ROTA(DMS)=”:
Arg(F)◆DMS▲
Lbi0:
Fix4:
“X+Yi=”?
X:
E+FXY:
“X+YOBJi=”:
Y▲
Goto0结束。
程序名:
A
P=0=>GotoX:
Abs(P)/PW:
O-T+∏R×Abs(P)/180+H/2-N/2Q:
HC:
0M跳行
IfZ≤O-T:
ThenZ-OS:
GZ[2]:
Goto1:
IfEnd跳行
IfZ﹤O-T+H:
ThenZ-O+TS:
Prog“HX”:
G+WKZ[2]:
A-TA:
GE:
Goto2:
IfEnd跳行
IfZ≤Q:
Then180(Z-O+T-0.5H)/R/∏S:
Prog“AB”:
A+R(1-cos(S))E:
B+Rsin(S)A:
EB:
RM:
G+WSZ[2]:
A-TA:
GE:
Goto2:
IfEnd跳行
IfZ﹤Q+N:
ThenQ+N-ZS:
NH:
Prog“HX”:
G+PE:
E-WK
Z[2]:
F-AA:
CH:
Goto2:
IfEnd跳行
Z-Q-N+FS:
G+PZ[2]跳行
Lbi1:
U+Scos(Z[2]I:
V+Ssin(Z[2]J:
P=0=>Z[2]+WB
Z[2]:
Return跳行
Lbi2:
U+Acos(E)-WBsin(EI:
V+Asin(E)+WBcos(EJ:
Return跳行
LbiX:
Abs(N)/NW:
1/HC:
(H-WN)/(2RHWN)L:
180/∏E:
Abs(Z-O)S:
IfH=WN:
ThenGotoY:
ElseGotoH:
IfEnd跳行
LbiY:
90S/∏/HB:
IfB>0.0001:
Then2Hsin(BS:
G+WBZ[2]:
HM:
Goto1:
ElseGZ[2]:
0M:
Goto1:
IfEnd跳行
LbiH:
0.1184634425A:
0.2393143352B:
0.28444444444
Q:
0.046910077K:
0.2307653449F:
0.5M:
U+S(Acos(G+WEKS(C+KSL))+Bcos(G+WEFS(C+FSL))+Qcos(G+WEMS(C+MSL))+Bcos(G+WE(1-F)S(C+(1-F)SL))+Acos(G+WE(1-K)S(C+(1-K)SL)))I:
V+S(Asin(G+WEKS(C+KSL))+Bsin(G+WEFS(C+FSL))+Qsin(G+WEMS(C+MSL))+Bsin(G+WE(1-F)S(C+(1-F)SL))+Asin(G+WE(1-K)S(C+(1-K)SL)))J:
G+WES(C+SL)Z[2]:
HM:
WN﹤H=>WNM:
S≠0=>RM