Post Reply 
Problem with append function
06-28-2015, 10:15 PM (This post was last modified: 06-28-2015 10:21 PM by BruceH.)
Post: #1
Problem with append function
Trying to do some simple things with lists in a program but not getting very far.

Code:
EXPORT test()
BEGIN
  LOCAL xx := {};
  LOCAL yy := 3;
  append(xx, yy);
  RETURN(xx); 
END;

I'd expect that to return { 3 } but actually you get {}. Have I missed something obvious?
(Emulator version 2015 6 17 Rev 8151)

(Edit) And in Home I get some equally strange results:
Code:
append({},3)      {3}
L1                 {}
append(L1,3)      {3}
L1                 {}
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
Problem with append function - BruceH - 06-28-2015 10:15 PM
RE: Problem with append function - eried - 06-28-2015, 10:43 PM
RE: Problem with append function - DrD - 06-29-2015, 10:24 AM
RE: Problem with append function - BruceH - 06-29-2015, 06:45 PM
RE: Problem with append function - eried - 07-01-2015, 02:42 AM



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