hi
Nekomls documentation is a bit sparse, so I hope this excuses this
basic question:

How can I access the value of an mutable var (reference)? (There is
nothing written in the doc about mutables, so maybe I'm completely
wrong). It should be *var - no?

This doesn't work:

var mutbl = &0;
mutbl := 789;

print *mutbl;
error: Cannot unify '_a -> void and int
//  "Cannot unify '_a ..." what does that mean?

print mutbl;  // what does it show? I think  this should be the
reference itself ...
(789)

printf "my mutbl: %d" *mutbl;
error: Cannot unify int -> void and int

and for completeness:

printf "my mutbl: %d" mutbl;
error: Cannot unify int ref and int

regards
ben

-- 
Neko : One VM to run them all
(http://nekovm.org)

Reply via email to