On 28-May-02, tmo wrote:

> 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 ?

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

-- 
To unsubscribe from this list, please send an email to
[EMAIL PROTECTED] with "unsubscribe" in the 
subject, without the quotes.

Reply via email to