home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Amoszine 6
/
Amoszine 6 (Disk 2 of 2).adf
/
extra_source.lha
/
OTHER_SOURCE
/
REF_NUMBER.Amos
/
REF_NUMBER.amosSourceCode
Encoding:
Amiga
Atari
Commodore
DOS
FM Towns/JPY
Macintosh
Macintosh JP
NeXTSTEP
RISC OS
UTF-8
Wrap
AMOS Source Code
|
1992-02-26
|
357 b
|
12 lines
Procedure REF_NUMBER[R$]
'UPDATED V1_f_37
'* Converts the 3-digit R$ into it's value
'* Can handle > 16 million w/o looping around
'
'Modified by Andy Church: return a number instead of a string, and fix
' "R2=...*256" (now "...*255").
'
R1=(Asc(Left$(R$,1))-1)*65535
R2=(Asc(Mid$(R$,2,1))-1)*255
R3=(Asc(Mid$(R$,3,1))-1)
End Proc[R1+R2+R3]