as we all know, both of 
    
    
    import strformat
    
    var
      i = 16
    
    echo fmt"{16:x}"
    echo fmt"{i:x}"
    
    
    Run

print 10

now, is it possible to use the format specifier in variant f? None of the 
following is corrected 
    
    
    import strformat
    
    var
      i = 16
      f = 'x'
    
    
    Run

then 
    
    
    echo fmt"{i:f}"
    
    
    Run

or
    
    
    echo fmt"{i:{f}}"
    
    
    Run

or 
    
    
    echo fmt"\{i:{f}\}".fmt
    
    
    Run

Reply via email to