another way, works for 0 <= n <= 256 , expandable.
on d2h d
return rgb(0,0,d).hexstring().char[6..7]
end
on h2d h
return rgb("#"&h).blue
end
best regards
daniel plaenitz
At 09:49 17.01.2001 +0900, Fumio Nonaka wrote:
>Another code:
>
>on xDecToHex nDec
> nDec = integer(nDec)
>
Another code:
on xDecToHex nDec
nDec = integer(nDec)
if nDec < 0 then return void
if nDec = 0 then return "0"
sHexNums = "0123456789ABCDEF"
repeat while nDec
sNum = sHexNums.char[(nDec mod 16) + 1]
sResult = sNum & sResult
nDec = nDec / 16
end repeat
return sResult
end
__
ion.qc.ca
--
> -Original Message-
> From: ICG [mailto:[EMAIL PROTECTED]]
> Sent: 16 janvier, 2001 04:34
> To: [EMAIL PROTECTED]
> Subject: Converting String to Hex code
>
>
> How to convert a string to a Hex code or to Un
How to convert a string to a Hex code or to Unicode. Is there an analogue of
JavaScript escape() function in Lingo?
Araik
[To remove yourself from this list, or to change to digest mode, go to
http://www.penworks.com/LUJ/lingo-l.cgi To post messages to the list,
email [EMAIL PROTECTED] (Prob