Thank you mratsim. I will use ByteAddress instead of int. Anyway, Can you 
please guide me on this ? 
    
    
    type
        ListClass = ref object
            typ : typedesc
            pointR : ByteAddress
    
    var x = new ListClass
    x.typ = string
    x.pointR = cast[ByteAddress](addr("A sample string"))
    
    var y : seq[ListClass]
    y.add(x)
    # Then later...
    var z = cast[ref y[0].typ](y[0].pointR)
    echo z[]  # Here i want to print "A sample string"
    
    
    Run

Reply via email to