10.07.2015 Views

1130 Commercial Subroutine Package - All about the IBM 1130 ...

1130 Commercial Subroutine Package - All about the IBM 1130 ...

1130 Commercial Subroutine Package - All about the IBM 1130 ...

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Example: DIMENSION IFLD(20)N=0CALL DECA1(IFLD,7,17,N)Before: 7,17IFLD AbBbCbDbEbFb00000713661EbNbDb1 1Position 1 5 10 15 20N=0After: 7,17IFLD AbBbCbDbEbFb0b0b0b0b0b7b1b3b6b6bJbEbNbDb1Position 1 5 10 15 20N=0Before execution <strong>the</strong> field is shown in decimal format. The field to be converted is00000713661After execution, <strong>the</strong> field has been converted to Al format, as is evident, <strong>the</strong> characterfollowed by a blank. There were no invalid digits in <strong>the</strong> field, since N is <strong>the</strong> same.Errors: If an invalid digit (not 0 to 9, inclusive) is encountered, <strong>the</strong> error indicator isset equal to <strong>the</strong> position of that character, and processing of <strong>the</strong> field continues.Remarks: When <strong>the</strong> error indicator indicates an error, <strong>the</strong> digit indicated is <strong>the</strong> lastinvalid digit. There may be o<strong>the</strong>r invalid digits in <strong>the</strong> field, occurring to <strong>the</strong> left of <strong>the</strong>digit noted.These errors should not occur, since <strong>the</strong> arithmetic routines (ADD, SUB, MPY, andDIV) will resolve carries. However, if this does happen, <strong>the</strong> user's program shouldindicate (possibly by STOPing) that this has occurred.Note that <strong>the</strong> error indicator is not reset by this subroutine. It is <strong>the</strong> responsibility of<strong>the</strong> user to initialize and reset <strong>the</strong> error indicator.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!