(a) If any commissioned officer, dismissed by order of the president, makes a written application for trial by court-martial setting forth under oath, that he has been wrongfully dismissed, the President, as soon as practicable, shall convene a general court-martial to try that officer on the charges on which he was dismissed. A court-martial so convened has jurisdiction to try the dismissed officer on those charges, and he shall be considered to have waived the right to plead any statute of limitations applicable to any offense with which he is charged. The court-martial may, as part of its sentence, adjudge the affirmance of the dismissal, but if the court-martial acquits the accused or if the sentence adjudged, as finally approved or affirmed, does not include dismissal or death, the Secretary concerned shall substitute for the dismissal ordered by the President a form of discharge authorized for administrative issue.
(b) If the President fails to convene a general court-martial within six months from the preparation of an application for trial under this article, the Secretary concerned shall substitute for the dismissal order by the President a form of discharge authorized for administrative issue.
(c) If a discharge is substituted for a dismissal under this article, the President alone may reappoint the officer to such commissioned grade and with such rank as, in the opinion of the President, that former officer would have attained had he not been dismissed. The reappointment of such a former officer shall be without regard to the existence of a vacancy and shall affect the promotion status of other officers only insofar as the President may direct. All time between the dismissal and the reappointment shall be considered as actual service for all purposes, including the right to pay and allowances.
(d) If an officer is discharged from any armed force by administrative action or is dropped from the rolls by order of the President, he has no right to trial under this article.