To affirm is to solemnly declare the truth of a matter, or an ability to
testify truthfully. An affirmation is given in the place of an oath when
the witness has some objection to taking an oath, for example, a Jehovah's
Witness would make an affirmation as opposed to solemnly swearing to tell
the truth, the whole truth and nothing but the truth. Affirming and swearing
have the same legal effect. So a person who lies on the stand after affirming
that they would tell the truth would perjure him or herself.