@Skaruts: Alas, Nim doesn't accept this code:
    
    
    ### Define the class
    #
    type
        Euler* = object
            x, y, z, a, b, c: float64
    
    method dump( self: Euler): string =
        return "x"
    
    method print( self: Euler): void =
        echo( self.x, ", ", self.y)
    
    method `x`*( self: Euler): float64 =
        self.x
    
    method `x=`*( self: var Euler, x: float64) =
        self.x = x
    
    ### Use the class
    #
    var euler: Euler = Euler( x: 1, y: 2)
    euler.print()
    euler.x( 42)
    echo( euler.x())
    
    Run

It says: "Error: in expression 'euler.x(42)': identifier expected, but found 
'euler.x'".

Any idea?

Paul

Reply via email to