Re: Should %d round?

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

What is Kenneth suggesting? Is it that we should have optional user-defined string cast operators?

-- allow double sized values but not the kinds with the fraction part... 
type hex(atom i) 
   return floor(i) = i 
end type 
 
name_of hex(integer i) 
    return sprintf("%x",i) 
end name_of 
 
hex x = 10 
 
? name_of(x) -- prints 'A', the hexadecimal form for ten. 
new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu