bug: not able to convert integer variable with to-binary
[1/4] from: artus_fr::yahoo::fr at: 27-May-2002 14:04
hi.
to-binary [255] works...=> #{FF}
but when i use a integer variable, for example this:
mavar: 255
to-binary [mavar] or to-binary [:mavar]
=> it doesnt work !!!
So how can convert my integer variable into binary ?
thanks for your help
:-)
[2/4] from: rotenca:telvia:it at: 27-May-2002 15:09
Hi, tmo
a: 255
to binary! to block! a
to binary! to paren! a
to binary! reduce [a]
to binary! compose [(a)]
to binary! to path! a
---
Ciao
Romano
[3/4] from: carl:cybercraft at: 28-May-2002 0:58
On 28-May-02, tmo wrote:
> hi.
> to-binary [255] works...=> #{FF}
<<quoted lines omitted: 3>>
> => it doesnt work !!!
> So how can convert my integer variable into binary ?
Your problem is that the 'mavar in the block is a word, not an
integer...
>> mavar: 255
== 255
>> type? first [mavar]
== word!
The solution is to reduce the word...
>> type? first reduce [mavar]
== integer!
So...
>> to-binary reduce [mavar]
== #{FF}
--
Carl Read
[4/4] from: artus_fr:yaho:o at: 28-May-2002 10:20
Hi carl and romano.
Thanks for help.
All is right !!!
:-)
Notes
- Quoted lines have been omitted from some messages.
View the message alone to see the lines that have been omitted