Quick actions

cmd+k|ctrl+k

Navigation

Languages

Untitled

Snippet info

Language

Nim

Visibility

unlisted

Author

legacy-anonymous

Created

2016-09-30T06:36:48Z

Updated

2016-09-30T06:36:48Z

type Histogram=object 
  name:string 

template getptr(x:untyped)= 
  var x:ptr type(x)=cast[ptr type(x)](alloc0(sizeof(x))) 

var x=Histogram()
block:
  getptr(x)
  x[] = Histogram()
INFO