Post Reply 
Visibility of a var outside a cycle
03-09-2015, 01:51 PM
Post: #3
RE: Visibility of a var outside a cycle
(03-09-2015 01:39 PM)DrD Wrote:  Code food for thought:

Code:

EXPORT Varb()
BEGIN
  local j, m:=10, tn:=0,DL:={};

  FOR j FROM 1 TO m DO
    DL:=CONCAT(DL,2);  //  Appending 10 two's to reach 1024 via gamma list
  END;

  tn:=ΠLIST(DL);  //  2^10 = 1024
  return tn^2;  //  1024^2 = 1,048,576.00
END;

always thank you Smile
you're code was ok!
However sorry for my stupid question: I had actually 1204 and I read "1024", so I was so silly confused. Too hurry... Smile

Salvo

∫aL√0mic (IT9CLU) :: HP Prime 50g 41CX 71b 42s 39s 35s 12C 15C - DM42, DM41X - WP34s Prime Soft. Lib
Visit this user's website Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
RE: Visibility of a var outside a cycle - salvomic - 03-09-2015 01:51 PM



User(s) browsing this thread: 1 Guest(s)