[Date Prev] [Date Next] [Thread Prev] [Thread Next] Date Index Thread Index Search archive:
Date:Mon Jan 17 09:52:42 1994 
Subject:constant confusion 
From: 
Volume-ID:940117.01 

Hullo,
	This is a Monday morning repost as the news area was too full on 
Friday.

Hullo POP people,
	One of those Friday afternoon confusions I would really appreciate a
clear answer to. Consider the following:

constant a1;

[1 2 3]->a1;

define binki(lst);
lvars lst;
    10->hd(lst);
enddefine;


When I run binki() it changes the value of the constant a1. I'm sure this is
what everyone apart from me would expect (even on a Friday). So WHY does this
happen and HOW do I stop it? Do I really need to copytree(lst) if I don't
want to change a1? I'm sure there are reasonable explanations for this, and
why this should be the desired behaviour, that it is a feature of the language
and one that makes POP-11 superior to XYZ language, and that I shouldn't be
doing it this way anyway, but please humour me just this once!

I am confused about constants and lvars - HELP!

Thank-you!

Daniel.