Easy as cake
    
    
    type
        UDP_packet = object
            port_src: uint16
            port_dst: uint16
            length: uint16
            chksum: uint16
            data: UncheckedArray[byte]
    
    
    
    Run

> It won't print nicely though

Yeah, the compiler-generated `$` doesn't know that `length` refers to `data`. 
Just write your own `$`.

Reply via email to