[Templates] Multiple Dimension Arrays
Bullock Stuart
Stuart.Bullock@uk.mizuho-sc.com
Wed, 20 Dec 2006 14:06:07 -0000
This is a multi-part message in MIME format.
------_=_NextPart_001_01C7243F.FE6D5D51
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: quoted-printable
To Whom It May Concern:
=20
I have a problem in attempting to access a matrix style array.
=20
If anyone can help I should be very grateful. If I have posted to the
wrong email address, my apologies and please advise me of the correct
email address to TT2 problems to.
=20
Data Structure
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
=20
dataFile =3D (
name =3D> "Curve
Matrix"
,matrix =3D> [
=20
[ 0 , 365 , 1095 , 1825 , 3650 , 2555 ]
=20
,[2.3 , 0.142 , 0 , 0 , 0 , 0 ]
=20
,[2.4 , 0 , 1.72 , 0 , 0 , 1.71 ]
=20
,[2.5 , 0 , 0 , 1.75 , 1.90 , 0 ]
]
=20
);
=20
Output
=3D=3D=3D=3D=3D=3D
What I should like on the output is:
=20
0,365,1095,1825,3650,255
2.3,0.142,0,0,0,0
2.4,0,1.72,0,0,1.71
2.5,0,0,1.75,1.90,0
=20
Naive Attempted Solution
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
[%- USE matrix =3D iterator(dataFile.matrix) %]
[% FOREACH line =3D matrix %]
[%- FOREACH column =3D line %]
[%- %][% column %] [% IF NOT column.last %],[% END %]
[%- END %]
[% END %]
=20
As stated - any help or pointers with the syntax welcome.
=20
Regards,
=20
Stuart Bullock
This message and any files transmitted with it are confidential and intende=
d solely for the use of the individual or entity to whom they are addressed=
. If you have received this message in error please delete it and any files=
transmitted with it, after notifying postmaster@uk.mizuho-sc.com=20
Any opinions expressed in this message may be those of the author and not n=
ecessarily those of the company. The company accepts no responsibility for =
the accuracy or completeness of any information contained herein. This mess=
age is not intended to create legal relations between the company and the r=
ecipient.=20
Recipients should please note that messages sent via the Internet may be in=
tercepted and that caution should therefore be exercised before dispatching=
to the company any confidential or sensitive information.=20
Mizuho International plc Bracken House, One Friday Street, London EC4M 9JA.=
TEL. 020 72361090. Wholly owned subsidiary of Mizuho Securities Co., Ltd. =
Member of Mizuho Financial Group. Authorised and regulated by the Financial=
Services Authority. Member of the London Stock Exchange.=20
Registered in England No. 1203696. Registered office as above.
------_=_NextPart_001_01C7243F.FE6D5D51
Content-Type: text/html; charset="us-ascii"
Content-Transfer-Encoding: quoted-printable
<html>
<head>
<meta http-equiv=3DContent-Type content=3D"text/html; charset=3Dus-ascii">
<meta name=3DGenerator content=3D"Microsoft Word 10 (filtered)">
<style>
<!--
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0cm;
margin-bottom:.0001pt;
font-size:12.0pt;
font-family:"Times New Roman";}
a:link, span.MsoHyperlink
{color:blue;
text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
{color:purple;
text-decoration:underline;}
p.MsoPlainText, li.MsoPlainText, div.MsoPlainText
{margin:0cm;
margin-bottom:.0001pt;
font-size:10.0pt;
font-family:"Courier New";}
span.EmailStyle17
{font-family:Arial;
color:windowtext;}
@page Section1
{size:612.0pt 792.0pt;
margin:72.0pt 90.0pt 72.0pt 90.0pt;}
div.Section1
{page:Section1;}
-->
</style>
</head>
<body lang=3DEN-US link=3Dblue vlink=3Dpurple>
<div class=3DSection1>
<p class=3DMsoNormal><font size=3D2 face=3DArial><span lang=3DEN-GB style=
=3D'font-size:
10.0pt;font-family:Arial'>To Whom It May Concern:</span></font></p>
<p class=3DMsoNormal><font size=3D2 face=3DArial><span lang=3DEN-GB style=
=3D'font-size:
10.0pt;font-family:Arial'> </span></font></p>
<p class=3DMsoNormal><font size=3D2 face=3DArial><span lang=3DEN-GB style=
=3D'font-size:
10.0pt;font-family:Arial'>I have a problem in attempting to access a matrix
style array.</span></font></p>
<p class=3DMsoNormal><font size=3D2 face=3DArial><span lang=3DEN-GB style=
=3D'font-size:
10.0pt;font-family:Arial'> </span></font></p>
<p class=3DMsoNormal><font size=3D2 face=3DArial><span lang=3DEN-GB style=
=3D'font-size:
10.0pt;font-family:Arial'>If anyone can help I should be very grateful.&nbs=
p;
If I have posted to the wrong email address, my apologies and please advise=
me
of the correct email address to TT2 problems to.</span></font></p>
<p class=3DMsoNormal><font size=3D2 face=3DArial><span lang=3DEN-GB style=
=3D'font-size:
10.0pt;font-family:Arial'> </span></font></p>
<p class=3DMsoNormal><font size=3D2 face=3DArial><span lang=3DEN-GB style=
=3D'font-size:
10.0pt;font-family:Arial'>Data Structure</span></font></p>
<p class=3DMsoNormal><font size=3D2 face=3DArial><span lang=3DEN-GB style=
=3D'font-size:
10.0pt;font-family:Arial'>=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D</span></font></=
p>
<p class=3DMsoNormal><font size=3D2 face=3DArial><span lang=3DEN-GB style=
=3D'font-size:
10.0pt;font-family:Arial'> </span></font></p>
<p class=3DMsoNormal><font size=3D2 face=3DArial><span lang=3DEN-GB style=
=3D'font-size:
10.0pt;font-family:Arial'>dataFile  =
; =3D
(</span></font></p>
<p class=3DMsoNormal><font size=3D2 face=3DArial><span lang=3DEN-GB style=
=3D'font-size:
10.0pt;font-family:Arial'> &=
nbsp; &nbs=
p; &=
nbsp; name &nbs=
p; =3D>
“Curve Matrix”</span></font></p>
<p class=3DMsoNormal><font size=3D2 face=3DArial><span lang=3DEN-GB style=
=3D'font-size:
10.0pt;font-family:Arial'> &=
nbsp; &nbs=
p; &=
nbsp; ,matrix &=
nbsp; =3D>
[</span></font></p>
<p class=3DMsoNormal><font size=3D2 face=3DArial><span lang=3DEN-GB style=
=3D'font-size:
10.0pt;font-family:Arial'> &=
nbsp; &nbs=
p; &=
nbsp; &nbs=
p; &=
nbsp; &nbs=
p; [
0 , 365 , 1095 , 1825 , 3650 , 2555 &nb=
sp;]</span></font></p>
<p class=3DMsoNormal><font size=3D2 face=3DArial><span lang=3DEN-GB style=
=3D'font-size:
10.0pt;font-family:Arial'> &=
nbsp; &nbs=
p; &=
nbsp; &nbs=
p; &=
nbsp; &nbs=
p; ,[2.3
, 0.142 , 0 , 0  =
; ,
0 , 0 ]</=
span></font></p>
<p class=3DMsoNormal><font size=3D2 face=3DArial><span lang=3DEN-GB style=
=3D'font-size:
10.0pt;font-family:Arial'> &=
nbsp; &nbs=
p; &=
nbsp; &nbs=
p; &=
nbsp; &nbs=
p; ,[2.4
, 0 , 1.72 ,
0 , 0 , 1.71 &n=
bsp; ]</span></font></p>
<p class=3DMsoNormal><font size=3D2 face=3DArial><span lang=3DEN-GB style=
=3D'font-size:
10.0pt;font-family:Arial'> &=
nbsp; &nbs=
p; &=
nbsp; &nbs=
p; &=
nbsp; &nbs=
p; ,[2.5
, 0 ,
0 , 1.75 , 1.90 ,
0 ]</span></font></p>
<p class=3DMsoNormal><font size=3D2 face=3DArial><span lang=3DEN-GB style=
=3D'font-size:
10.0pt;font-family:Arial'> &=
nbsp; &nbs=
p; &=
nbsp; &nbs=
p; &=
nbsp;
]</span></font></p>
<p class=3DMsoNormal><font size=3D2 face=3DArial><span lang=3DEN-GB style=
=3D'font-size:
10.0pt;font-family:Arial'> </span></font></p>
<p class=3DMsoNormal><font size=3D2 face=3DArial><span lang=3DEN-GB style=
=3D'font-size:
10.0pt;font-family:Arial'> &=
nbsp; &nbs=
p;
);</span></font></p>
<p class=3DMsoNormal><font size=3D2 face=3DArial><span lang=3DEN-GB style=
=3D'font-size:
10.0pt;font-family:Arial'> </span></font></p>
<p class=3DMsoNormal><font size=3D2 face=3DArial><span lang=3DEN-GB style=
=3D'font-size:
10.0pt;font-family:Arial'>Output</span></font></p>
<p class=3DMsoNormal><font size=3D2 face=3DArial><span lang=3DEN-GB style=
=3D'font-size:
10.0pt;font-family:Arial'>=3D=3D=3D=3D=3D=3D</span></font></p>
<p class=3DMsoNormal><font size=3D2 face=3DArial><span lang=3DEN-GB style=
=3D'font-size:
10.0pt;font-family:Arial'>What I should like on the output is:</span></font=
></p>
<p class=3DMsoNormal><font size=3D2 face=3DArial><span lang=3DEN-GB style=
=3D'font-size:
10.0pt;font-family:Arial'> </span></font></p>
<p class=3DMsoNormal><font size=3D2 face=3DArial><span lang=3DEN-GB style=
=3D'font-size:
10.0pt;font-family:Arial'>0,365,1095,1825,3650,255</span></font></p>
<p class=3DMsoNormal><font size=3D2 face=3DArial><span lang=3DEN-GB style=
=3D'font-size:
10.0pt;font-family:Arial'>2.3,0.142,0,0,0,0</span></font></p>
<p class=3DMsoNormal><font size=3D2 face=3DArial><span lang=3DEN-GB style=
=3D'font-size:
10.0pt;font-family:Arial'>2.4,0,1.72,0,0,1.71</span></font></p>
<p class=3DMsoNormal><font size=3D2 face=3DArial><span lang=3DEN-GB style=
=3D'font-size:
10.0pt;font-family:Arial'>2.5,0,0,1.75,1.90,0</span></font></p>
<p class=3DMsoNormal><font size=3D2 face=3DArial><span lang=3DEN-GB style=
=3D'font-size:
10.0pt;font-family:Arial'> </span></font></p>
<p class=3DMsoNormal><font size=3D2 face=3DArial><span lang=3DEN-GB style=
=3D'font-size:
10.0pt;font-family:Arial'>Naive Attempted Solution</span></font></p>
<p class=3DMsoNormal><font size=3D2 face=3DArial><span lang=3DEN-GB style=
=3D'font-size:
10.0pt;font-family:Arial'>=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D</span></font></p>
<p class=3DMsoNormal><font size=3D2 face=3DArial><span lang=3DEN-GB style=
=3D'font-size:
10.0pt;font-family:Arial'> [%- USE matr=
ix =3D
iterator(dataFile.matrix) %]</span></font></p>
<p class=3DMsoNormal><font size=3D2 face=3DArial><span lang=3DEN-GB style=
=3D'font-size:
10.0pt;font-family:Arial'> [% FOR=
EACH
line =3D matrix %]</span></font></p>
<p class=3DMsoNormal><font size=3D2 face=3DArial><span lang=3DEN-GB style=
=3D'font-size:
10.0pt;font-family:Arial'> &=
nbsp;
[%- FOREACH column =3D line %]</span></font></p>
<p class=3DMsoNormal><font size=3D2 face=3DArial><span lang=3DEN-GB style=
=3D'font-size:
10.0pt;font-family:Arial'> &=
nbsp;
[%- %][% column %] [% IF NOT column.last %],[% END %]</span></font></p>
<p class=3DMsoNormal><font size=3D2 face=3DArial><span lang=3DEN-GB style=
=3D'font-size:
10.0pt;font-family:Arial'> &=
nbsp;
[%- END %]</span></font></p>
<p class=3DMsoNormal><font size=3D2 face=3DArial><span lang=3DEN-GB style=
=3D'font-size:
10.0pt;font-family:Arial'> [% END=
%]</span></font></p>
<p class=3DMsoNormal><font size=3D2 face=3DArial><span lang=3DEN-GB style=
=3D'font-size:
10.0pt;font-family:Arial'> </span></font></p>
<p class=3DMsoNormal><font size=3D2 face=3DArial><span lang=3DEN-GB style=
=3D'font-size:
10.0pt;font-family:Arial'>As stated – any help or pointers with the
syntax welcome.</span></font></p>
<p class=3DMsoNormal><font size=3D2 face=3DArial><span lang=3DEN-GB style=
=3D'font-size:
10.0pt;font-family:Arial'> </span></font></p>
<p class=3DMsoNormal><font size=3D2 face=3DArial><span lang=3DEN-GB style=
=3D'font-size:
10.0pt;font-family:Arial'>Regards,</span></font></p>
<p class=3DMsoNormal><font size=3D2 face=3DArial><span lang=3DEN-GB style=
=3D'font-size:
10.0pt;font-family:Arial'> </span></font></p>
<p class=3DMsoNormal><font size=3D2 face=3DArial><span lang=3DEN-GB style=
=3D'font-size:
10.0pt;font-family:Arial'>Stuart Bullock</span></font></p>
</div>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
<head>
<meta content=3D"TX_HTML32 11.0.211.501" name=3DGENERATOR>
<title></title>
</head>
<body bgcolor=3D"#FFFFFF" text=3D"#000000">
<p style=3D"margin-top: 5pt;margin-bottom: 5pt;"><span style=3D"font-family=
:'Arial';font-size:8pt;">This message and any files transmitted with it are=
confidential and intended solely for the use of the individual or entity t=
o whom they are addressed. If you have received this message in error pleas=
e delete it and any files transmitted with it, after notifying </span><span=
style=3D"font-family:'Arial';font-size:8pt; color:#0000FF;"><u>postmaster@=
uk.mizuho-sc.com</u></span><span style=3D"font-family:'Arial';font-size:8pt=
;"> </span></p>
<p style=3D"margin-top: 5pt;margin-bottom: 5pt;"><span style=3D"font-family=
:'Arial';font-size:8pt;">Any opinions expressed in this message may be thos=
e of the author and not necessarily those of the company. The company accep=
ts no responsibility for the accuracy or completeness of any information co=
ntained herein. This message is not intended to create legal relations betw=
een the company and the recipient. </span></p>
<p style=3D"margin-top: 5pt;margin-bottom: 5pt;"><span style=3D"font-family=
:'Arial';font-size:8pt;">Recipients should please note that messages sent v=
ia the Internet may be intercepted and that caution should therefore be exe=
rcised before dispatching to the company any confidential or sensitive info=
rmation. </span></p>
<p><span style=3D"font-family:'Arial';font-size:8pt;">Mizuho International =
plc Bracken House, One Friday Street, London EC4M 9JA. TEL. 020 72361090. W=
holly owned subsidiary of Mizuho Securities Co., Ltd. Member of Mizuho Fina=
ncial Group. Authorised and regulated by the Financial Services Authority. =
Member of the London Stock Exchange. </span></p>
<p><span style=3D"font-family:'Arial';font-size:8pt;"></span></p>
<p><span style=3D"font-family:'Arial';font-size:8pt;"> </span></p>
<p><span style=3D"font-family:'Arial';font-size:8pt;">Registered in England=
No. 1203696. Registered office as above.</span></p>
<p><span style=3D"font-family:'Arial';font-size:8pt;"> </span></p></bo=
dy>
</html></body>
</html>
------_=_NextPart_001_01C7243F.FE6D5D51--