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 IPRNT(120)CALL PUT(IPRNT, 1,12, A, 5.0,1)Before:A = 1234567.IPRNT ABCDEFGHIJKLMNOPQRSbPosition 1 5 10 15 20After:A = 1234567.IPRNT 000000123457MNOPQRSb4 I 4 4Position 1 5 10 15 20Errors: NoneRemarks: If <strong>the</strong> receiving field, JCARD, is not large enough to hold all of <strong>the</strong> output,only <strong>the</strong> low-order digits are placed.If JLAST is less than or equal to J, only one digit will be PUT.It is necessary for <strong>the</strong> programmer to use <strong>the</strong> ADJST parameter in every PUT. Forexample, assume that <strong>the</strong> number to be PUT is 123.00. Because <strong>the</strong> <strong>IBM</strong> <strong>1130</strong> is a binarymachine, <strong>the</strong> number may be represented in core storage as 122.999....If this number isPUT with ADJST equal to zero, <strong>the</strong> result will be 122. However, with ADJST equal to0.5, <strong>the</strong> preliminary result is 123.499; when PUT, <strong>the</strong> result is 123. The value of ADJSTshould be a 5 in <strong>the</strong> decimal position one to <strong>the</strong> right of <strong>the</strong> low-order digit to be PUT.The last two factors, ADJST and N, form a logical pair, and should usually appear asei<strong>the</strong>r:ADJSTN.5 and 0or 5. and 1or 50. and 2or 500. and 3etc.etc.ADJST should never be less than .5, since this will introduce fraction inaccuracies.From this it follows that N should never be negative.If PUT (or GET) is used, <strong>the</strong> calling program must use extended precision.

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

Saved successfully!

Ooh no, something went wrong!