home *** CD-ROM | disk | FTP | other *** search
AMOS Source Code | 1992-02-26 | 468 b | 15 lines |
- Procedure REF_ASCII[N]
- 'UPDATED V1_f_37
- '* CONVERTS THE NUMBER N into A 3 DIGIT CHARACTER REPRESENTATION
- '* can handle > 16 million w/o looping around
- '
- 'Updated by Andy Church: accept a number instead of a string, and fix
- ' MOD statement below (used to be "mod 16581374", which cut off the
- ' highest value).
- '
- R=(N mod 16581375)
- R1=R/65025 : R=R-(R1*65025)
- R2=R/255 : R=R-(R2*255)
- Inc R1 : Inc R2 : Inc R
- R$=Chr$(R1)+Chr$(R2)+Chr$(R)
- End Proc[R$]