#79265 - 2002-10-29 11:06 AM
412.RC1 - Stupid 2d array tricks
|
Jochen
KiX Supporter
   
Registered: 2000-03-17
Posts: 6380
Loc: Stuttgart, Germany
|
Hi all,
seems to be that operations within the new multidim array notation won't work :
(found that one by replacing all "][" with "," in my hearts fragment)
This works :
code:
break on cls
dim $Hands[3]
$Deck = c2,c3,c4,c5,c6,c7,c8,c9,c_10,c___j,c__q,c_k,ca, d2,d3,d4,d5,d6,d7,d8,d9,d_10,d___j,d__q,d_k,da, s2,s3,s4,s5,s6,s7,s8,s9,s_10,s___j,s__q,s_k,sa, x2,x3,x4,x5,x6,x7,x8,x9,x_10,x___j,x__q,x_k,xa
;here is normally a shuffle routine
;excerpt of the Deal routine $Hands[0] = "","","","","","","","","","","","","" $Hands[1] = "","","","","","","","","","","","","" $Hands[2] = "","","","","","","","","","","","","" $Hands[3] = "","","","","","","","","","","","","" for $i = 0 to ubound($Deck) step 4 $Hands[1][$i/4] = $Deck[$i] $Hands[2][$i/4] = $Deck[$i+1] $Hands[3][$i/4] = $Deck[$i+2] $Hands[0][$i/4] = $Deck[$i+3] next
get $
This (new kind of writing it) won't (Script Error: expected ']')
code:
break on cls
dim $Hands[3]
$Deck = c2,c3,c4,c5,c6,c7,c8,c9,c_10,c___j,c__q,c_k,ca, d2,d3,d4,d5,d6,d7,d8,d9,d_10,d___j,d__q,d_k,da, s2,s3,s4,s5,s6,s7,s8,s9,s_10,s___j,s__q,s_k,sa, x2,x3,x4,x5,x6,x7,x8,x9,x_10,x___j,x__q,x_k,xa
;here is normally a shuffle routine
;excerpt of the Deal routine $Hands[0] = "","","","","","","","","","","","","" $Hands[1] = "","","","","","","","","","","","","" $Hands[2] = "","","","","","","","","","","","","" $Hands[3] = "","","","","","","","","","","","","" for $i = 0 to ubound($Deck) step 4 $Hands[1,$i/4] = $Deck[$i] $Hands[2,$i/4] = $Deck[$i+1] $Hands[3,$i/4] = $Deck[$i+2] $Hands[0,$i/4] = $Deck[$i+3] next
get $
Please enlight as I nearly lost my mind in spotting the looney here
Jochen [ 29. October 2002, 11:08: Message edited by: jpols ]
_________________________
|
|
Top
|
|
|
|
Moderator: ShaneEP, Arend_, Jochen, Radimus, Glenn Barnas, Allen, Ruud van Velsen, Mart
|
0 registered
and 2220 anonymous users online.
|
|
|