To generate metal-organic frameworks (MOFs) that are complex and modular yet well ordered, we present a strategy employing a family of three topologically distinct linkers that codes for the assembly of a highly porous quaternary MOF. By introducing substituted analogues of the ligands, a set of eight isoreticular frameworks is delivered, with the MOF structure systematically varied while the topology is maintained. To combat randomness and disorder, the substitution patterns of the ligands are designed to be compatible with their crystallographic site symmetries. MOFs produced in this way feature "programmed pores"--multiple functional groups compartmentalized in a predetermined array within a periodic lattice--and are capable of complex functional behavior. In these examples unconventional CO2 sorption trends, including capacity enhancements close to 100%, emerge from synergistic effects. Future PP-MOFs may be capable of enzyme-like heterogeneous catalysis and ultraselective adsorption.