Dress shorts are allowed on non formal nights but not on formal nights. Here is the info from Carnival's web site.
Cruise Casual Dining Dress Code: Gentlemen - Sport slacks, khakis, jeans (no cut-offs), dress shorts (long), collared sport shirts; Ladies - Casual dresses, casual skirts or pants and blouses, summer dresses, Capri pants, dress shorts, jeans (no cut-offs). Not permitted in the dining room during the Cruise Casual dinner for ladies and gentlemen: gym shorts, basketball shorts, beach flip-flops, bathing suit attire, cut-off jeans, and sleeveless shirts for men.
Cruise Elegant Dining Dress Code: Gentlemen - Dress slacks, dress shirts. We also suggest a sport coat. If you wish to wear suits and ties or tuxedos, by all means we invite you to do so. Ladies - Cocktail dresses, pantsuits, elegant skirts and blouses; if you‘d like to show off your evening gowns, that's great too! Not permitted in the dining room during the Cruise Elegant dinner for ladies and gentlemen: shorts, T-shirts, beach flip-flops, bathing suit attire, jeans, cut-off jeans, sleeveless shirts for men, sportswear, and baseball hats.