Título de la ventana upper$("Gridboxtest Nr.2: Ländervergleich con Num.-Spalten up/down")
'https://www.laenderdaten.info/iq-después de-laendern.php
var data$=\
"01|Singapur|108|20.994 €|745 €|31,5 °C#"+\
"02|Hongkong|108|21.004 €|771 €|26,1 °C#"+\
"03|Taiwan|106| | |27,1 °C#"+\
"04|Südkorea|106|11.328 €|430 €|18,2 °C#"+\
"05|Japan|105|30.407 €|1.047 €|19,8 °C#"+\
"06|China|104|1.136 €|22 €|19,4 °C#"+\
"07|Schweiz|102|41.319 €|2.040 €|12,7 °C#"+\
"08|Niederlande|102|27.585 €|1.388 €|14,3 °C#"+\
"09|Nordkorea|102| | |14,9 °C#"+\
"10|Macau|101|17.040 €|515 €|25,8 °C#"+\
"11|Island|101|28.850 €|1.997 €|7,9 °C#"+\
"12|Finnland|101|25.966 €|1.639 €|8,0 °C#"+\
"13|Kanada|101|22.761 €|1.366 €|7,4 °C#"+\
"14|Belgien|100|25.417 €|1.388 €|14,5 °C#"+\
"15|Deutschland|100|25.548 €|1.150 €|13,5 °C#"+\
"16|Vereinigtes Königreich|100|25.524 €|1.204 €|12,8 °C#"+\
"17|Österreich|100|26.442 €|1.456 €|13,0 °C#"+\
"18|Neuseeland|100|15.428 €|1.053 €|17,5 °C#"+\
"19|Norwegen|99|39.892 €|2.890 €|8,9 °C#"+\
"20|Schweden|99|30.087 €|1.932 €|9,4 °C#"+\
"21|Luxemburg|99|44.945 €|1.872 €|13,8 °C#"+\
"22|Dänemark|99|32.333 €|2.583 €|11,9 °C#"+\
"23|Tschechien|99|7.399 €|312 €|12,1 °C#"+\
"24|Estland|99|10.342 €|367 €|10,0 °C#"+\
"25|Australien|99|21.239 €|1.135 €|24,4 °C#"+\
"26|Frankreich|98|24.451 €|1.328 €|16,5 °C#"+\
"27|Vereinigte Staaten de Amerika|98|30.250 €|1.603 €|18,7 °C#"+\
"28|Ungarn|98|6.263 €|320 €|16,1 °C#"+\
"29|Malta|97|10.234 €|509 €|23,1 °C#"+\
"30|Italien|97|21.379 €|969 €|18,2 °C#"+\
"31|Lettland|97|6.164 €|267 €|10,7 °C#"+\
"32|Slowakei|97|6.827 €|269 €|14,9 °C#"+\
"33|Spanien|97|16.389 €|725 €|21,0 °C#"+\
"34|Slowenien|97|14.520 €|721 €|15,3 °C#"+\
"35|Polen|97|4.880 €|243 €|13,1 °C#"+\
"36|Russland|96|3.484 €|125 €|8,6 °C#"+\
"37|Moldawien|95|611 €|43 €|16,0 °C#"+\
"38|Kroatien|95|7.691 €|282 €|18,2 °C#"+\
"39|Ukraine|95|1.206 €|66 €|14,0 °C#"+\
"40|Portugal|95|11.715 €|599 €|21,2 °C#"+\
"41|Irland|94|23.518 €|1.340 €|13,2 °C#"+\
"42|Vietnam|94|400 €|21 €|29,2 °C#"+\
"43|Israel|94|16.028 €|1.021 €|26,2 °C#"+\
"44|Belarus|93|2.008 €|112 €|11,5 °C#"+\
"45|Malaysia|93|3.770 €|224 €|31,9 °C#"+\
"46|Litauen|93|5.967 €|263 €|11,4 °C#"+\
"47|Kasachstan|92|2.341 €|77 €|13,0 °C#"+\
"48|Griechenland|92|13.931 €|444 €|22,4 °C#"+\
"49|Bulgarien|91|2.288 €|90 €|17,8 °C#"+\
"50|Mazedonien|91|2.000 €|95 €|18,5 °C#"+\
"51|Argentinien|90|5.239 €|231 €|23,8 °C#"+\
"52|Rumänien|90|2.686 €|92 €|15,0 °C#"+\
"53|Türkei|89|4.069 €|115 €|19,8 °C#"+\
"54|Thailand|89|2.154 €|88 €|32,8 °C#"+\
"55|Serbien|89|3.007 €|127 €|18,1 °C#"+\
"56|Chile|89|4.661 €|172 €|17,4 °C#"+\
"57|Kambodscha|88|315 €|6 €|33,4 °C#"+\
"58|Laos|88|347 €|9 €|32,0 °C#"+\
"59|Mauritius|87|3.742 €|137 €|26,3 °C#"+\
"60|Costa Rica|86|3.316 €|180 €|28,9 °C#"+\
"61|Philippinen|86|1.080 €|30 €|31,3 °C#"+\
"62|Mexiko|86|5.052 €|228 €|29,2 °C#"+\
"63|Tonga|86|1.834 €|86 €|27,1 °C#"+\
"64|Irak|86|3.245 €| |32,3 °C#"+\
"65|Venezuela|85|3.887 €|193 €|31,6 °C#"+\
"66|Bolivien|85|852 €|56 €|25,3 °C#"+\
"67|Kuba|84|2.682 €|257 €|29,8 °C#"+\
"68|Iran|84|2.335 €|97 €|23,6 °C#"+\
"69|Montenegro|84|4.774 €| |19,2 °C#"+\
"70|Albanien|84|1.415 €|45 €|22,5 °C#"+\
"71|Indonesien|84|898 €|24 €|31,7 °C#"+\
"72|Ägypten|83|1.023 €|48 €|30,0 °C#"+\
"73|Ecuador|83|1.943 €|56 €|24,5 °C#"+\
"74|Myanmar|83|412 €|4 €|32,1 °C#"+\
"75|Brasilien|83|3.685 €|186 €|30,6 °C#"+\
"76|Vereinigte Arabische Emirate|83|40.246 €|309 €|34,5 °C#"+\
"77|Pakistan|82|508 €|13 €|31,5 °C#"+\
"78|Algerien|82|1.913 €|88 €|24,9 °C#"+\
"79|Peru|82|1.913 €|63 €|25,8 °C#"+\
"80|Syrien|82|935 €|50 €|25,6 °C#"+\
"81|Kolumbien|82|2.219 €|101 €|28,3 °C#"+\
"82|Marokko|82|1.418 €|73 €|24,0 °C#"+\
"83|Bosnien y Herzegowina|82|2.000 €| |18,5 °C#"+\
"84|Indien|81|469 €|18 €|29,8 °C#"+\
"85|Saudi-Arabien|81|8.742 €|570 €|32,6 °C#"+\
"86|Afghanistan|80|273 €|10 €|24,3 °C#"+\
"87|Sri Lanka|79|847 €|24 €|28,9 °C#"+\
"88|Madagaskar|79|229 €|7 €|28,4 °C#"+\
"89|Bangladesch|77|373 €|7 €|30,7 °C#"+\
"90|Nepal|77|229 €|8 €|25,6 °C#"+\
"91|Kenia|71|397 €|27 €|28,8 °C#"+\
"92|Tansania|71|268 €|10 €|29,9 °C#"+\
"93|Südafrika|70|3.248 €|181 €|24,8 °C#"+\
"94|Nigeria|70|420 €| |33,0 °C#"+\
"95|Jamaika|70|2.484 €|131 €|31,8 °C#"+\
"96|Ghana|69|438 €|27 €|31,5 °C#"+\
"97|Namibia|69|2.272 €|160 €|29,1 °C#"+\
"98|Mali|64|315 €|11 €|36,0 °C#"+\
"99|Demokratische Republik Kongo|63|159 €|3 €|30,0 °C#"+\
"100|Eritrea|63|207 €|8 €|29,2 °C#"+\
"101|Guinea-Bissau|62|253 €|10 €|32,9 °C#"+\
"102|Äthiopien|61|156 €|6 €|27,1 °C#"+\
"103|Senegal|60|566 €|25 €|35,7 °C#"+\
"104|Gambia|60|469 €|10 €|32,7 °C#"+\
"105|Osttimor|60|1.629 €|50 €|31,0 °C#"+\
"106|Gabun|60|3.991 €|155 €|29,8 °C#"+\
"107|São Tomé y Príncipe|58|783 €|43 €|28,6 °C#"+\
"108|Äquatorialguinea|56|2.757 €|119 €|30,2 °C"
Windowstyle 24':window 0,0-640,480
CLS
var srt$=""
var t$=\
";1;0;"+\
"Platz;1;40;"+\
"Land;0;180;"+\
"Ø IQ;2;80;"+\
"Ø Einkommen;1;80;"+\
"Bildungsausg/EW;2;110;"+\
"Ø Tageshöchsttemp;2;130"
var sort&=1:var multi&=2
var gbhdl&=@Crear("GridBox",%hwnd,t$,sort&+multi&, 0,0,width(%hwnd),height(%hwnd))
declarar tmp$[],mx%,my%,down&,spalte&
tmp$[]=explode(data$,"#"):clear data$
spalte&=2
MAKEGRID:
whileloop 0,sizeof(tmp$[])-1
Addstring(gbhdl&,num$(tmp$[&Loop],spalte&,down&)+"|"+tmp$[&Loop])
endwhile
@Seleccione String(gbhdl&,-1,"Schweiz")
@Seleccione String(gbhdl&,-1,"Deutschland")
@Seleccione String(gbhdl&,-1,"OEsterreich")
repeat
waitmouse
mx%=%mousex:my%=%mousey
' Windowtitle str$(mx%)+","+str$(my%)
if my%<23 : down&=0:caso my%<12:down&=1
if mx%<42:spalte&=1
elseif mx%<222:spalte&=2
elseif mx%<300:spalte&=3
elseif mx%<382:spalte&=4
elseif mx%<490:spalte&=5
elseif mx%>=490:spalte&=6
endif
clearlist gbhdl&
goto "MAKEGRID"
endif
until %key=27
FIN
proc num$ :parámetros z$,sp&,down&
var s$=substr$(z$,sp&,"|")
s$=translate$(s$," €","")
s$=translate$(s$," °C","")
s$=translate$(s$,".","")
s$=translate$(s$,",","")
if val(s$)<>0
s$=right$("0000000000"+s$,10)
caso down&:s$=str$(2147483647-val(s$))
más
s$=substr$(z$,sp&,"|")
s$=translate$(s$,"Ä","AE")
s$=translate$(s$,"Ö","OE")
s$=translate$(s$,"Ü","UE")
s$=translate$(s$,"ä","ae")
s$=translate$(s$,"ö","oe")
s$=translate$(s$,"ü","ue")
s$=translate$(s$,"ß","ss")
' if down&=1:var b$="" 'FEHLSCHLAG: Aplpha-Sort revers funktioniert así no!
' whileloop len(s$)
' b$=b$+chr$(abs(255-ord( mid$(s$,&Loop,1) )))
' endwhile
' s$=b$
' endif
endif
volver s$
ENDPROC