[Prev][Next][Index][Thread]

Re: how to make a vector of constants?



On Tue, 7 Mar 2000 12:00:02 -0500 (EST), dauclair@hotmail.com wrote:

> I'm building this system:
> 
> define constant $jack = 11;
> define constant $queen = 12;
> define constant $king = 13;
> define constant $ace = 14;
> 
> and I want to do this:
> 
> let faces = #[ $jack, $queen, $king, $ace ];
> 
> when I try to compile I get [FD]:
> 
> Unexpected token: "$jack".
> 
> Is there a simpler/cleaner way than:
> 
> let faces = make(<vector>,size: 4);
> faces[0] := $jack;
> faces[1] := $queen;
> faces[2] := $king;
> faces[3] := $ace;

Yes.

	let faces = vector( $jack, $queen, $king, $ace );

__Jason


References: