Plus we are going to be able to drop all the zeropad functions and use printf [-11] now/date and printf [-8] now/time instead? That'll make a simple thing simpler.
Please tell me we'll be able to do similar expressions for string compositions.
Haaaa! Ha! 'printf magic for me, that is! :-) Thanks, I hate not having pad/left/right function. It would be nice, if printf could form decimals too, as there is nothig worse than trying to output to form even small 1 / 100 = 1E-2 ;-)|
(Shortcut for great, cool and impressive)
What does "get query file" do? In an R2 console, I get 'none for any file.
Very nice.. :)
(I would put the actual filenames in the right-most column, as they have the most variable length).|
Henrik: I guess it's similar to R2's:
>> get info? %rebol.exe
== [660992 6-Dec-2005/12:19:35+1:00 file]
Does your last sentence mean, you are now using UTC instead of LCT as default?|
Best embedding of printf i have seen :)|
I always hated printf...
now I don't have a reason to, wow!
I'm just wondering if your printf truncates or extends the lines. and if decimals can have a dot notation like:
[16 -8 " " 24.2 " " 6]
where the .2 remainder would mean align all decimals AT second position (following negative to indicate from start or end).
I'm also curious if/how? you handle centering columns...
and the killer question... does it RETURN the string or not? subject of much debate on print itself ;-)
And it would be nice to have formf, too. Which will _only_ return the string.|
Nice. But I second Maxim's comment: I would also like a version that just returns the formatted string - perhaps called FORMAT (an extended FORM). Decimal formatting would be nice too.|
> as there is nothing worse than trying
> to output to form even small 1 / 100 = 1E-2
I can think of a great many medical problems worse than that :-)
As far as I recall, the .01 ==> 1E-2 is a RAMBOed issue that affects Windows implementations only.....But if RT can put a wrapper around whatever WinAPI native is causing that, several of us will be grateful.
yes when displaying data a clean decimal value is essential.
(think of view fields as well, for example)
While not a comment on printf, but more on what the code is actually doing?
Has anyone seen (cough) the MS Powershell command Format-Table?
dir | format-table
dir | select name, directory, lastaccesstime | format-table
Automatically sizes columns and truncates strings... I'm finding it incredibly useful and very easy to use....
Can you tell we rebheads are jonesing for a sprintf style native?|
Cool demo for concisness (always good), but we need more details on the dialect (e.g. how to format numbers with separators in them).
The first thing that jumped out at me was the use of a negative number to--I'm guessing--right align the value. Just doesn't strike me as REBOLish.
WRT a FORMAT func, that should really feed to PRINT, rather than having PRINTF, otherwise, we will need WRITEF or SPRINTF, etc.?
If PRINTF is just there to make C folks happy, that's fine, but then let's have a better way to do it as well, that really fits REBOL. A nice FORMAT func, and look at how tbl, eqn, et al do their thing.
So, an R3 teaser.
Carl, you know we are all now salivating at the mouth waiting for the bell? Is the bell about to ring? Or do we just keep humming the 'wake me up...when September ends' tune? :)
Keep them coming.
You can post a comment here. Keep it on-topic.