wants one for Tests logischer Schaltungen with Computerhilfe only any useful vorkommende Signalvarianten run through, remaining in the rule nothing other spare, as all possible Kombinationen hereon abzuklopfen, whether The jeweilige combination vorkommt or not. there The amount fundamentally möglicher Konfigurationen known with the number the Freiheitsgrade explode, prod such Approaches right quick on your border. there's one then glad, The Number of Opportunities from the Vorgaben on whom Testgenerator since already explicit retrenching to. moreover the following Demoprogramm - How always without Gewähr!
In XProfan11 shine Whileloop-Scheifen only up to of/ one limited Verschachtelungstiefe without Error To works. Überschreitet is a censorial number, forget the system whom stood äusserer Schleifenwerte (what me but very of verwendeten Betriebssystem and of disengaged Auslagerungsspeicher abzuhängen shining). circa this behaviour To bypass, afford itself Arrayvariablen as downstairs and upper Limits on, and these Limits serve then too same to values-Einschränkung, How supra demand, because one z.B. under- and ceiling einengt or gleichsetzt.
Window Title "Aufsteigender From-To-Enumerator without Stack-Overflow"
'(CL) CopyLeft 2016-07f by P.woodpecker, Vienna/Austria; OHNE JEGLICHE GEWÄHR!
declare of$,To$,n&,anz&,tmp$[],u&[],o&[],x&[],v&,nr&
CLS
Goto "Test3"' which Test should displayed go?
' THE ENUMERATOR MIT INDEX v&= ... ZÄHLT ...
' v&= 20__19____16__15_____12__11_____8____7____...___2_1_0"
von$=" 0, 0,0,0,0, 0,0,0,0, 4,0,0,0, 8,6,2,0, 3,1,0,9"
bis$=" 1, 9,0,0,0, 0,0,0,0, 4,0,0,0, 9,7,4,1, 5,2,1,9"
Goto "Init"
Test2:
' THE ENUMERATOR MIT INDEX v&=... ZÄHLT ...
' v&=_2_1_0"
von$="0,1,0"
bis$="2,2,0"
Goto "Init"
Test3:
' THE ENUMERATOR MIT INDEX v&= ... ZÄHLT ...
' v&= 20__19____16__15_____12__11_____8____7____...___2_1_0"
von$=" 0, 0,0,0,0, 0,0,0,0, 4,0,0,0, 8,6,2,5, 6,7,8,9"
bis$=" 1, 9,0,0,0, 0,0,0,0, 4,0,0,0, 9,7,4,5, 6,7,8,9"
Goto "Init"
'==========================================================
Init:
tmp$[]=explode(of$,","):n&=sizeof(tmp$[]):setsize u&[],n&:u&[]=val(tmp$[n&-1-&index])
clear tmp$[]:tmp$[]=explode(To$,","):setsize o&[],n&:o&[]=val(tmp$[n&-1-&index])
clear tmp$[],of$,To$:setsize x&[],n&
anz&=1:whileloop 0,n&-1:anz&=anz&*(o&[&loop]-u&[&loop]+1):endwhile
:print "\n it go ";anz&;" Konfigurationen created:\n":waitinput 1500
Start:
x&[]=u&[&index]
Whileloop anz&:Nr&=&Loop
:print " ";Nr&;": ";:whileloop n&-1,0,-1:print x&[&Loop];:endwhile :print
' ... or something Nützliches so make.
Repeat
if x&[v&]<o&[v&]
x&[v&]=x&[v&]+1
break
else
x&[v&]=u&[v&]
inc v&
endif
until v&>=n&
v&=0
endwhile
Beep
waitinput 30000
END
|