Re: Problem with printf

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

Allen Robnett wrote:
> Printf works fine in my app, with sequence slice to limit the number of 
> characters actually printed:
> 
> printf(1,"%8s",data_array[rec_no][1..6])  for example.

You say it works fine, but I don't believe you.
Please add braces:

printf(1,"%8s",{data_array[rec_no][1..6]})

I know it looks strange, but in Euphoria
it logically has to work this way. You have one %,
so you should supply a sequence of
length 1 (at the top-level), not 6, as the third argument.
Otherwise only the first character of 6 will be printed.

Everyone (including myself) falls into this trap
sooner or later.

Regards,
    Rob Craig
    Rapid Deployment Software
    http://www.RapidEuphoria.com

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

Search



Quick Links

User menu

Not signed in.

Misc Menu