Forum | | | | - Page 1 - |
| | Hello people, i'm another ziemlicher Beginner, what these Language angeht. I Please therefore circa understanding, if my question iwie stupid is or so.
my trouble is: I have a software program, The one Tanztunier evaluate should. really has the yet everything integrally well worked, only jetz be I unfortunately hang stayed: each Tanzpaar get a Gesamtpunktzahl, The the program already errechnet. but now must I for burst give away, d.h. I must it somehow hinkriegen, that The Platzierungen on The pairs give away go, depending on, How many spots you've. now is the only not so How your think: whom first Space in example has the couple, the least of all spots has.
I hope, me can someone help, these Platzierungen simply To calculate. but the program must so calculate, that 2 pairs gleichviele spots and have therefore must tappt im dunkeln too The same Platzierung get.
Please declared me the vividly, if possible. Vielen Thanks in the ahead!! tecnologymaster |
| | | | |
| | « this Posting watts as Solution marked. » | | Thomas Freier | @Jörg, Why should it of under begin? because
whom first Space in example has the couple, the least of all spots has.
Declare Listbox%,end%, Space%, x!, y%, z! ,Text$
SetTrueColor 1
Cls @RGB(255,255,255)
ListBox%=@CreateSortedListBox(%hWnd,"",20,20,200,200)
' can also a unsichtbare Listbox his....Box(%hWnd,"",0,0,0,0)
@AddStrings(ListBox%,stature$("000.00",10.20)+" | "+"Müller")
@AddStrings(ListBox%,stature$("000.00",5.40)+" | "+"Meier")
@AddStrings(ListBox%,stature$("000.00",1.2)+" | "+"Karl")
@AddStrings(ListBox%,stature$("000.00",8.00)+" | "+"Wert")
@AddStrings(ListBox%,stature$("000.00",1.2)+" | "+"Hansen")
Platz%=0
x!=0
y%=20
z!= -1
Decimals 2
WhileLoop @GetCount(ListBox%)
'WhileLoop begins with 1, 1.row list = 0, d.h. index Liste= & Loop-1
x!=val(Translate$(Substr$(@GetString$(ListBox%,(&Loop-1)),1,"|"),",","."))
case x! > z! : inc Space%' Space% only raise, if next worth larger
Text$=st$(Space%)+".Space "+Substr$(@GetString$(ListBox%,(&Loop-1)),2,"|")
DrawText 300,y%,Text$
Text$="With "+ st$(x!)+" Punkten"
DrawText 480,y%,Text$
y%=y%+20
z!= x!
EndWhile
WaitKey
End
|
| | | Gruß Thomas Windows XP SP2, XProfan X2 | 12/22/10 ▲ |
| | |
| | Jörg Sellmeyer | Hi,
i'd The Punktzahlen with stature$() in Strings transfiguring. and of course so, that any Zahlenstrings The same length having - means with Vornullen top up. If the amount maximum dreistellig is, sounds The Formel so:
spots$ = stature$("000",spots%) + "|" + subscriber$
then any Strings in a sortierte Listbox. then have You Schonmal The Order. now can You of under begin The burst To give away. The latest entry get Schonmal whom 1. Space. you mußt now only yet to that each nächsthöheren Listenplatz The Punktzahl vergleichen circa equal Punkteständen whom equal Space zuzuweisen. yet eleganter does it with a List view but I white not, which Profanversion you have.
Greeting Jörg |
| | | Windows XP SP2 XProfan X4... und hier mal was ganz anderes als Profan ... | 12/21/10 ▲ |
| |
| | | [offtopic]Topic from the Help to Website ^^ to XProfan-Forum moved. [/offtopic] |
| | | | |
| | Thomas Freier | @Jörg, Why should it of under begin? because
whom first Space in example has the couple, the least of all spots has.
Declare Listbox%,end%, Space%, x!, y%, z! ,Text$
SetTrueColor 1
Cls @RGB(255,255,255)
ListBox%=@CreateSortedListBox(%hWnd,"",20,20,200,200)
' can also a unsichtbare Listbox his....Box(%hWnd,"",0,0,0,0)
@AddStrings(ListBox%,stature$("000.00",10.20)+" | "+"Müller")
@AddStrings(ListBox%,stature$("000.00",5.40)+" | "+"Meier")
@AddStrings(ListBox%,stature$("000.00",1.2)+" | "+"Karl")
@AddStrings(ListBox%,stature$("000.00",8.00)+" | "+"Wert")
@AddStrings(ListBox%,stature$("000.00",1.2)+" | "+"Hansen")
Platz%=0
x!=0
y%=20
z!= -1
Decimals 2
WhileLoop @GetCount(ListBox%)
'WhileLoop begins with 1, 1.row list = 0, d.h. index Liste= & Loop-1
x!=val(Translate$(Substr$(@GetString$(ListBox%,(&Loop-1)),1,"|"),",","."))
case x! > z! : inc Space%' Space% only raise, if next worth larger
Text$=st$(Space%)+".Space "+Substr$(@GetString$(ListBox%,(&Loop-1)),2,"|")
DrawText 300,y%,Text$
Text$="With "+ st$(x!)+" Punkten"
DrawText 480,y%,Text$
y%=y%+20
z!= x!
EndWhile
WaitKey
End
|
| | | Gruß Thomas Windows XP SP2, XProfan X2 | 12/22/10 ▲ |
| |
| | Jörg Sellmeyer | Ah - is correct Yes. The smallest entry is supra. I programmier To little in the momentum... |
| | | Windows XP SP2 XProfan X4... und hier mal was ganz anderes als Profan ... | 12/22/10 ▲ |
| |
| | Thomas Freier | Ergänzend, if to two 1. the Dritte whom 3.Space has:
Declare Listbox%,end%, Space%, x!, y%, z! ,Text$
SetTrueColor 1
Cls @RGB(255,255,255)
ListBox%=@CreateSortedListBox(%hWnd,"",20,20,200,200)
' can also a unsichtbare Listbox his....Box(%hWnd,"",0,0,0,0)
@AddStrings(ListBox%,stature$("000.00",10.20)+" | "+"Müller")
@AddStrings(ListBox%,stature$("000.00",5.40)+" | "+"Meier")
@AddStrings(ListBox%,stature$("000.00",1.2)+" | "+"Karl")
@AddStrings(ListBox%,stature$("000.00",8.00)+" | "+"Wert")
@AddStrings(ListBox%,stature$("000.00",1.2)+" | "+"Hansen")
Platz%=0
x!=0
y%=20
z!= -1
Decimals 2
WhileLoop @GetCount(ListBox%)
'WhileLoop begins with 1, 1.row list = 0, d.h. index Liste= & Loop-1
x!=val(Translate$(Substr$(@GetString$(ListBox%,(&Loop-1)),1,"|"),",","."))
case x! > z! : Space% = &Loop
Text$=st$(Space%)+".Space "+Substr$(@GetString$(ListBox%,(&Loop-1)),2,"|")
DrawText 300,y%,Text$
Text$="With "+ st$(x!)+" Punkten"
DrawText 480,y%,Text$
y%=y%+20
z!= x!
EndWhile
WaitKey
End
or the 1. the with the most Points is:
Declare Listbox%, Box%, Space%, x!, y%, z! ,Text$
SetTrueColor 1
Cls @RGB(255,255,255)
' can also a unsichtbare Listbox his....Box(%hWnd,"",0,0,0,0)
ListBox%=@CreateSortedListBox(%hWnd,"",20,20,200,200)
' Listbox to that sort with Punktegleichheit
Box%=@CreateSortedListBox(%hWnd,"",0,0,0,0)
@AddStrings(ListBox%,stature$("000.00",10.20)+" | "+"Müller")
@AddStrings(ListBox%,stature$("000.00",5.40)+" | "+"Meier")
@AddStrings(ListBox%,stature$("000.00",5.4)+" | "+"Karl")
@AddStrings(ListBox%,stature$("000.00",5.40)+" | "+"Wert")
@AddStrings(ListBox%,stature$("000.00",1.2)+" | "+"Hansen")
Platz%=1
x!=0
y%=20
z!= 10000
Decimals 2
WhileLoop @GetCount(ListBox%),1,-1
'WhileLoop begins with 1, 1.row list = 0, d.h. index Liste= & Loop-1
@AddStrings(Box%,@GetString$(ListBox%,(&Loop-1)))' for spending
x!=val(Translate$(Substr$(@GetString$(ListBox%,(&Loop-1)),1,"|"),",","."))
case x! < z!: Space% =@GetCount(ListBox%)-&Loop+1
' If the next worth in Box 1 small: spending Box 2
case x! > val(Translate$(Substr$(@GetString$(ListBox%,(&Loop-2)),1,"|"),",",".")): display
z!= x!
EndWhile
WaitKey
End
Proc display
Declare a%
a%=0
While a%<=(@GetCount(Box%)-1)
Text$=st$(Space%)+".Space "+Substr$(@GetString$(Box%,a%),2,"|")
DrawText 300,y%,Text$
Text$="With "+ st$(x!)+" Punkten"
DrawText 480,y%,Text$
y%=y%+20
inc a%
Endwhile
DestroyWindow(box%)
Box%=@CreateSortedListBox(%hWnd,"",0,0,0,0)
Endproc
ought to to Help everything ex Profan 7.5 walk. Edit 25.12., so too The names with Punktegleichheit sortiert are. |
| | | Gruß Thomas Windows XP SP2, XProfan X2 | 12/23/10 ▲ |
| |
|
AnswerTopic-Options | 13.486 Views |
Themeninformationenthis Topic has 4 subscriber: |