Re: sprintf() query

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

in a Phix string, how do I output "hello" as numbers?

pp("hello",{pp_StrFmt,1})  -- shows {104,101,108,108,111} 

In Phix, you can also do this:

?("hello"&-1)[1..$-1] 

The &-1 auto-expands the string to a dword-sequence (and the () stop it from trying to subscript the -1).

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

Search



Quick Links

User menu

Not signed in.

Misc Menu