Category : Files from Magazines
Archive   : APR91.ZIP
Filename : 2N04039B

 
Output of file : 2N04039B contained in archive : APR91.ZIP
'
' Casting 9's, table lookup version.
'

DEFINT I-K
DEFLNG L
FUNCTION CAST2 (L) STATIC
' On first call, set up table values
IF IFIRSTCALL = 0 THEN
IFIRSTCALL = 1
REDIM ISUM(0 TO 99)
ISUM(0) = 0
FOR I = 1 TO 91 STEP 9
FOR J = 1 TO 9
ISUM(I+J-1) = J
NEXT J
NEXT I
END IF
' Then loop over pairs of digits
K = 0
L1 = L
WHILE L1 > 99
K = ISUM(K + ISUM(L1 MOD 100))
L1 = L1 \ 100
WEND
CAST2 = ISUM(K + ISUM(L1))
END FUNCTION


  3 Responses to “Category : Files from Magazines
Archive   : APR91.ZIP
Filename : 2N04039B

  1. Very nice! Thank you for this wonderful archive. I wonder why I found it only now. Long live the BBS file archives!

  2. This is so awesome! 😀 I’d be cool if you could download an entire archive of this at once, though.

  3. But one thing that puzzles me is the “mtswslnkmcjklsdlsbdmMICROSOFT” string. There is an article about it here. It is definitely worth a read: http://www.os2museum.com/wp/mtswslnk/