Post Reply 
(49G) ISBN Check Character
05-30-2015, 01:16 PM (This post was last modified: 06-15-2017 01:45 PM by Gene.)
Post: #1
(49G) ISBN Check Character
The programme takes a nine digit string from the stack & returns the original string & the ISBN check character.

eg for input

"019530818"

the programme returns

"019530818"
2

Code:
::
  CK1&Dispatch
  BINT3
  ::
    DUPLEN$
    BINT9
    #=
    NcaseSIZEERR
    BINT0
    BINT10
    ONE_DO
    OVER
    ISTOP-INDEX
    SUB$1#
    BINT48
    #-
    INDEX@
    #1+
    #*
    #+
    LOOP
    BINT11
    #/
    DROP
    DUP#0=csedrp
    Z0_
    BINT11
    SWAP#-
    BINT10
    #=casedrop
    'IDX
    FPTR2 ^#>Z
  ;
;
Find all posts by this user
Quote this message in a reply
Post Reply 




User(s) browsing this thread: 1 Guest(s)