The following warnings occurred:
Warning [2] count(): Parameter must be an array or an object that implements Countable - Line: 795 - File: showthread.php PHP 7.4.33 (FreeBSD)
File Line Function
/showthread.php 795 errorHandler->error





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 


Messages In This Thread
(49G) ISBN Check Character - Gerald H - 05-30-2015 01:16 PM



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