cc: [email protected] 
Subject: Re: [ast-users] Can't pass parameters to an instance constructor
--------


> Hi, here x.val is assigned after the constructor has already run. It should 
> be 
> assigned before so it's accessiable to the "create":
> 
> typeset -T X=(
>     integer val
> 
>     function create {
>         ((_.val++))
>     }
> )
> 
> X x=(val=5)
> print -v x.val # should print 6
> 
> -- 
> Dan Douglas
> 

ksh93 currently doesn't have a create discipline and you example
doesn't invoke x.create so why should val be incremented?

David Korn
[email protected]
_______________________________________________
ast-users mailing list
[email protected]
http://lists.research.att.com/mailman/listinfo/ast-users

Reply via email to