Re: Object to Atom

new topic     » goto parent     » topic index » view thread      » older message » newer message
BRyan said...
buzzo said...

How can the object {2} be converted to an atom?

Z

 
object my_object my_object = 2 
atom my_atom my_atom = 0 
 
-- check the size first 
if atom(my_object) then 
  ? my_object 
else 
  puts(1,"Object will not fit in atom\n" ) 
end if 
 

But the object in OP's post was {2}, not 2. Also you did not show how to convert to an atom, just how to test for it.

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu