RE: adding numbers
- Posted by Derek Parnell <Derek.Parnell at SYD.RABOBANK.COM> Jun 05, 2002
- 382 views
This message is in MIME format. Since your mail reader does not understand this format, some or all of this message may not be legible. ------_=_NextPart_000_01C20CDF.27E71090 charset=iso-8859-1 -----Original Message----- From: Orpheus Mullen [mailto:orpheus_mullen at btopenworld.com] Subject: adding numbers In My latest program I Need tobe abble to add two numbers which apper in a sequence together E.g "{1,6) = {16}" This probaly is very trivial but it really needs to be done --Derek Replies-------------- If you literally mean that your have a two-element sequence and you want to convert it to a one-element sequence in the manner exampled above then .... sequence x x = {1,6} x = { x[1]*10 + x[2] } and in the general case of an arbitary sized sequence then... atom r r = 0 for i = 1 to length(x) do r = (r*10) + x[i] end for x = {r} hope this helps. ------------ Derek. ================================================================== De informatie opgenomen in dit bericht kan vertrouwelijk zijn en is uitsluitend bestemd voor de geadresseerde. Indien u dit bericht onterecht ontvangt wordt u verzocht de inhoud niet te gebruiken en de afzender direct te informeren door het bericht te retourneren. ================================================================== The information contained in this message may be confidential and is intended to be exclusively for the addressee. Should you receive this message unintentionally, please do not use the contents herein and notify the sender immediately by return e-mail. ================================================================== ------_=_NextPart_000_01C20CDF.27E71090 Content-Type: application/ms-tnef