new topic     » goto parent     » topic index » view thread      » older message » newer message

RTFM. I quote: "Variable declarations inside a subroutine must all
appear at the beginning, *before* the executable statements of the
subroutine."  (my emphasis)

jiri

----- Original Message -----
From: "Grape_ Vine_" <g__vine at HOTMAIL.COM>
To: <EUPHORIA at LISTSERV.MUOHIO.EDU>
Sent: Sunday, December 10, 2000 1:04 PM


> Well i found the problem, But i have no clue what the problem is
> I swiched the order to
>
>   sequence Shuffling_Deck
>   atom temp, temp_1, card_2
>     Shuffling_Deck() = New_Deck()
>
> And it works just fine, Again, Anyone have any idea what is going on
> here??????
>
>
>
> >From: Grape_ Vine_ <g__vine at HOTMAIL.COM>
> >Reply-To: Euphoria Programming for MS-DOS
<EUPHORIA at LISTSERV.MUOHIO.EDU>
> >To: EUPHORIA at LISTSERV.MUOHIO.EDU
> >Date: Sat, 9 Dec 2000 15:30:58 -0800
> >
> >First, This function is broken, Any ideas why? I get the error
> >
> >Syntax error - expected to see =, +=, -=, *=, /= or &=
> >    Shuffling_Deck() = New_Deck()
> >                  ^
> >Wich if i remove the () changes to
> >
> >Syntax error - expected to see possibly 'end', not a type
> >  atom temp, temp_1, card_2
> >     ^
> >The only way to stop the errors is to rem out
> >    Shuffling_Deck() = New_Deck()
> >
> >Any ides???
> >
> >Also, Is this the best way to swap two elements of an sequence?
> >
> >
> >function shuffle()
> >  sequence Shuffling_Deck
> >    Shuffling_Deck() = New_Deck()
> >  atom temp, temp_1, card_2
> >    for card = 1 to 52 do
> >      temp = Shuffling_Deck[card]
> >      card_2 = rand(52)
> >      temp_1 = Shuffling_Deck[card_2]
> >      Shuffling_Deck[1] = temp_1
> >      Shuffling_Deck[card_2] = temp
> >    end for
> >return Shuffling_Deck
> >
> >
> >
> >J Reeves
> >Grape Vine
> >ICQ# 13728824
> >
>
>_____________________________________________________________________
________________
> >Get more from the Web.  FREE MSN Explorer download :
> >http://explorer.msn.com
>
>
______________________________________________________________________
_______________
> Get more from the Web.  FREE MSN Explorer download :
http://explorer.msn.com
>

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu