Re: Problem with printf
- Posted by Robert Craig <rds at RapidEuphoria.com> Dec 31, 2003
- 583 views
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