H DFTNAME(TETSKSN) DATEDIT(*YMD/) BNDDIR('QC2LE') F********** 算術計算テスト ******************************************* F* F********************************************************************** * CRTRPGMOD OBJ(QTEMP/TESTKSN) SRCFILE(R610SRC/QRPGLESRC) * DBGVIEW(*SOURCE) AUT(*ALL) * CRTPGM PGM(ASNET.COM/TESTKSN) MODULE(QTEMP/TESTKSN) ACTGRP(*NEW) * AUT(*ALL) *-------------------------------------------------------------------* * 2020/08/24 : 作成 *-------------------------------------------------------------------* *( 作業変数 ) D SUA S 4S 0 INZ(10) D SUB S 4S 0 INZ(5) D TOTAL S 4S 0 D GOKEI S 4S 0 C*-------------------------------------------------------------------------+ /FREE TOTAL = SUA + SUB; // 足し算 SUB = TOTAL - SUA; // 引き算 GOKEI = SUA * SUB; // 掛け算 SUB = GOKEI / SUA; // 割り算 GOKEI = 102; SUB = %REM(GOKEI:SUA); // 余り /END-FREE C SETON LR C RETURN C****************************************************** C *INZSR BEGSR C****************************************************** C* 初期 CYCLE のみの実行 C ENDSR