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, 49g+ & 50g) ZREV: Speedily Reverse Digits of Integer
01-14-2018, 02:09 PM
Post: #1
(49G, 49g+ & 50g) ZREV: Speedily Reverse Digits of Integer
For integer input Z the programme returns the reversed digits integer,

eg for input

778

the programme returns

877.

The programme is much faster than converting to a string, SREV & converting to an object.

NB: FPTR 2 A5 has been a stable pointer at least from 1.19-6 on.

Size: 37.

CkSum: # 262Eh

ZREV

Code:
::
  CK1&Dispatch
  # FF
  ::
    FPTR 2 A5
    BINT11
    OVERLEN$
    #1-SUB$
    FPTR2 ^S>Z
  ;
;
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
(49G, 49g+ & 50g) ZREV: Speedily Reverse Digits of Integer - Gerald H - 01-14-2018 02:09 PM



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