Re: Unevaluated a[[1]]*a[[2]]
- To: mathgroup at smc.vnet.net
- Subject: [mg65180] Re: [mg65165] Unevaluated a[[1]]*a[[2]]
- From: Bob Hanlon <hanlonr at cox.net>
- Date: Thu, 16 Mar 2006 06:33:40 -0500 (EST)
- Reply-to: hanlonr at cox.net
- Sender: owner-wri-mathgroup at wolfram.com
unevalTimes[x_List]:=
Module[{s=ToString/@x},
Fold[#1<>" * "<>#2&,First[s],Rest[s]]];
a={0.1245,0.543};
x=unevalTimes[a]
0.1245 * 0.543
ToExpression[x]==Times@@a
True
x=unevalTimes[Range[7]]
1 * 2 * 3 * 4 * 5 * 6 * 7
ToExpression[x]==7!
True
Bob Hanlon
>
> From: "Alexandre Costa" <amscosta at uem.br>
To: mathgroup at smc.vnet.net
> Subject: [mg65180] [mg65165] Unevaluated a[[1]]*a[[2]]
>
> Dear Group,
> Suppose I have a = {0.1245, 0.543};
> I want to check the values of the product:
> a[[1]]*a[[2]]. So I just want to see the product unevaluated as output:
> 0.1245*0.543.
> Thanks,
> Alex
>
>
>