identificationdivision. program-id. maxmin. author. " Gannod/Cheng - Strongest Postcondition". date-written. 2.1.2006. datadivision. working-storagesection. 77 a pic9(4)V99. 77 b pic9(4)V99. 77 c pic9(4)V99. 77 Largest pic9(4)V99. 77 Smallest pic9(4)V99. proceduredivision. move5to a move10to b call swapa using a, b call swapb using a, b call funnyswap using a, b call FindMaxMin using a, b, Largest, Smallest move Largest to c end-program maxmin.
identificationdivision. program-id. FindMaxMin. author. " Gannod/Cheng - Strongest Postcondition". date-written. 2.1.2006. datadivision. linkagesection. 77 NumOne pic9(4)V99. 77 NumTwo pic9(4)V99. 77 Maxx pic9(4)V99. 77 Minn pic9(4)V99. proceduredivisionusing NumOne, NumTwo, Maxx, Minn. if NumOne > NumTwo then move NumOne to Maxx move NumTwo to Minn else move NumTwo to Maxx move NumOne to Minn end-if end-program FindMaxMin.
identificationdivision. program-id. swapa. author. " Gannod/Cheng - Strongest Postcondition". date-written. 2.1.2006. datadivision. linkagesection. 77 X pic9(4)V99. 77 Y pic9(4)V99. proceduredivisionusing X, Y. add X to Y subtract X from Y giving X subtract X from Y end-program swapa.
identificationdivision. program-id. swapb. author. " Gannod/Cheng - Strongest Postcondition". date-written. 2.1.2006. datadivision. working-storagesection. 77 temp pic9(4)V99. linkagesection. 77 X pic9(4)V99. 77 Y pic9(4)V99. proceduredivisionusing X, Y. move X to temp move Y to X move temp to Y end-program swapb.
identificationdivision. program-id. funnyswap. author. " Gannod/Cheng - Strongest Postcondition". date-written. 2.1.2006. datadivision. working-storagesection. 77 temp pic9(4)V99. linkagesection. 77 X pic9(4)V99. 77 Y pic9(4)V99. proceduredivisionusing X, Y. move temp to X move Y to X move temp to Y end-program funnyswap.
Messung V0.5 in Prozent
¤ Dauer der Verarbeitung: 0.11 Sekunden
(vorverarbeitet am 2026-06-11)
¤
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.