Ok, If you're sure you need just one FileBits definition,
    
    
    const BitDepth = 32
    
    when BitDepth == 8:
      type FileBits = uint8
    
    when BitDepth == 16:
      type FileBits = uint16
    
    when BitDepth == 24:
      type FileBits = uint32
    
    when BitDepth == 32:
      type FileBits = uint32
    
    when BitDepth == 64:
      type FileBits = uint64
    
    var
        bits : FileBits
    
    echo sizeof(bits)
    
    
    Run

Reply via email to