Rank: Advanced Member
Groups: Registered, Registered Users, Subscribers, Unverified Users Joined: 10/28/2004(UTC) Posts: 3,111 Location: Perth, Western Australia
Was thanked: 16 time(s) in 16 post(s)
|
Just thinkin' aloud (allowed :) ??)...
I haven't tested this, but try reusing the variables, this means that instead of being restricted by the number of variable, the limit will be the length of the code, and the entire function is contained:
v1:=Security("XOM",C);
V2:=Security("WMT",C);
V3:=Security("UTX",C);
v4:=Security("T",C);
V5:=Security("SBC",C);
v6:=Security("PG",C);
V7:=Security("MSFT",C);
V8:=Security("MRK",C);
v9:=Security("MO",C);
V0:=Security("JPM",C);
Group1:=
Cross(Mov(V1,12,E)-Mov(V1,26,E),0)+
Cross(Mov(V2,12,E)-Mov(V2,26,E),0)+
Cross(Mov(V3,12,E)-Mov(V3,26,E),0)+
Cross(Mov(V4,12,E)-Mov(V4,26,E),0)+
Cross(Mov(V5,12,E)-Mov(V5,26,E),0)+
Cross(Mov(V6,12,E)-Mov(V6,26,E),0)+
Cross(Mov(V7,12,E)-Mov(V7,26,E),0)+
Cross(Mov(V8,12,E)-Mov(V8,26,E),0)+
Cross(Mov(V9,12,E)-Mov(V9,26,E),0)+
Cross(Mov(V0,12,E)-Mov(V0,26,E),0);
v1:=Security("A",C);
V2:=Security("B",C);
V3:=Security("C",C);
v4:=Security("D",C);
V5:=Security("E",C);
v6:=Security("F",C);
V7:=Security("G",C);
V8:=Security("H",C);
v9:=Security("I",C);
V0:=Security("J",C);
Group2:=
Cross(Mov(V1,12,E)-Mov(V1,26,E),0)+
Cross(Mov(V2,12,E)-Mov(V2,26,E),0)+
Cross(Mov(V3,12,E)-Mov(V3,26,E),0)+
Cross(Mov(V4,12,E)-Mov(V4,26,E),0)+
Cross(Mov(V5,12,E)-Mov(V5,26,E),0)+
Cross(Mov(V6,12,E)-Mov(V6,26,E),0)+
Cross(Mov(V7,12,E)-Mov(V7,26,E),0)+
Cross(Mov(V8,12,E)-Mov(V8,26,E),0)+
Cross(Mov(V9,12,E)-Mov(V9,26,E),0)+
Cross(Mov(V0,12,E)-Mov(V0,26,E),0);
v1:=Security("K",C);
V2:=Security("L",C);
V3:=Security("M",C);
v4:=Security("N",C);
V5:=Security("O",C);
v6:=Security("P",C);
V7:=Security("Q",C);
V8:=Security("R",C);
v9:=Security("S",C);
V0:=Security("T",C);
Group3:=
Cross(Mov(V1,12,E)-Mov(V1,26,E),0)+
Cross(Mov(V2,12,E)-Mov(V2,26,E),0)+
Cross(Mov(V3,12,E)-Mov(V3,26,E),0)+
Cross(Mov(V4,12,E)-Mov(V4,26,E),0)+
Cross(Mov(V5,12,E)-Mov(V5,26,E),0)+
Cross(Mov(V6,12,E)-Mov(V6,26,E),0)+
Cross(Mov(V7,12,E)-Mov(V7,26,E),0)+
Cross(Mov(V8,12,E)-Mov(V8,26,E),0)+
Cross(Mov(V9,12,E)-Mov(V9,26,E),0)+
Cross(Mov(V0,12,E)-Mov(V0,26,E),0);
Group1+Group2+Group3
(You can have 20 variables defined, this code has used 13)
To save a few characters, and allow more functions in the same length of code, try replacing
Cross(Mov(V7,12,E)-Mov(V7,26,E),0)+
with
Cross(Mov(V7,12,E),Mov(V7,26,E))+
its the same thing (someone might prove me wrong here?) and it saves 2 characters each time it is used. You might need this space for other things??
As I said, I havent tested this theory, perhaps someone might like to try it out and post the results here?
Hope this helps
wabbit :D
|