I'm trying to use templates to paste code:
    
    
    template someCode(): untyped =
      var
        fname: string = "Mark"
        age: int = "44"
    
    someCode()
    
    echo fname
    

The above code does not recognise the var declarations and the code below 
doesn't run either
    
    
    template someCode(): untyped =
      fname: string
      age: int
    
    type
      Person = object
        someCode()
    

Reply via email to