[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

re easylang. help



PureBytes Links

Trading Reference Links

Hi

First thanks a million to Bob and Mike for very
proffesional and informative reply's.

Bob I realy want to use easylang.  not basic, because this will be part 
of the system, so it's better to use one language for all system parts.

I have used parts from both of your codes and came up with the following:

variables:n(0),x(0),y(0),z(0),str(""),goodnbr(true);
if currentbar=1 then begin
 FOR X = 1000000 TO 1555555 begin
  goodnbr=true;
  str=numtostr(x,0);
  str=midstr(str,2,6);
  FOR Y = 1 TO 6 begin
   if midstr(str, y, 1) > "5" then goodnbr=false;
   FOR Z = Y + 1 TO 6 begin
    IF midstr(str, Y, 1) = MIDstr(str, Z, 1) then goodnbr=false;
   end;
  end;
  if goodnbr then begin
   N = N + 1;
   print(numtostr(n,0),"-", str);
  end;
 end;
end;

I need 6 digit number with unique digits from 0 to 5.

This code works partialy,  before going into infinite loop.

Any suggestions are very welcome.


Thanks again

Ed

Ps. following is a complete printout from debug window.

1-012345
2-012354
3-012435
4-012453
5-012534
6-012543
7-013245
8-013254
9-013425
10-013452
11-013524
12-013542
13-014235
14-014253
15-014325
16-014352
17-014523
18-014532
19-015234
20-015243
21-015324
22-015342
23-015423
24-015432
25-021345
26-021354
27-021435
28-021453
29-021534
30-021543
31-023145
32-023154
33-023415
34-023451
35-023514
36-023541
37-024135
38-024153
39-024315
40-024351
41-024513
42-024531
43-025134
44-025143
45-025314
46-025341
47-025413
48-025431
49-031245
50-031254
51-031425
52-031452
53-031524
54-031542
55-032145
56-032154
57-032415
58-032451
59-032514
60-032541
61-034125
62-034152
63-034215
64-034251
65-034512
66-034521
67-035124
68-035142
69-035214
70-035241
71-035412
72-035421
73-041235
74-041253
75-041325
76-041352
77-041523
78-041532
79-042135
80-042153
81-042315
82-042351
83-042513
84-042531
85-043125
86-043152
87-043215
88-043251
89-043512
90-043521
91-045123
92-045132
93-045213
94-045231
95-045312
96-045321
97-051234
98-051243
99-051324
100-051342
101-051423
102-051432
103-052134
104-052143
105-052314
106-052341
107-052413
108-052431
109-053124
110-053142
111-053214
112-053241
113-053412
114-053421
115-054123
116-054132
117-054213
118-054231
119-054312
120-054321
121-102345
122-102354
123-102435
124-102453
125-102534
126-102543
127-103245
128-103254
129-103425
130-103452
131-103524
132-103542
133-104235
134-104253
135-104325
136-104352
137-104523
138-104532
139-105234
140-105243
141-105324
142-105342
143-105423
144-105432