The way you describe is as good as any other way. It makes it clear exactly what happens, in case you (or anyone else) examines your code someday.
The aim is to account for all possible conditions and thus be certain all assignments are done. Therefore it might pay to check afterward that all assignments received a legitimate value, and if not then display an alert.