Re: formatter



On Dec 4, 2:00 am, "Carl Taylor" <carltay...@xxxxxxx> wrote:
I'm trying to get a grip on <formatter>.

So <format> is a function that can take a control
string, or a function generated by the macro
<formatter>. Said function contains an
(apply #'format (args) ...). So where's the gain
in efficiency? Is it that the function somehow
eliminates <format>'s need to parse the control string
at run time, i.e. moving something messy up to compile
time?

When and how would this be used to advantage?
Maybe with very complex control strings or if
the <format> is embedded in some iterative structure.

But it doesn't seem to be used routinely.

Carl Taylor

FORMATTER allows you to compile the format control
string into code and thus removes the runtime interpretation
aspect of it.

BUT. I can't remember if any CL implementation actually implements
a FORMAT compiler. Last I've looked, most just call FORMAT as usual.
FORMATTER is defined just in case some implementation
wants to provide that functionality.


.



Relevant Pages

  • Re: Is this good use of Properties?
    ... >> nor in the business of programming as a backing of design-heuristic ... >>>Assuming some class external to string needed to know it's length How would you get it? ... >>>I need to send it across the pipe to another process (I don't control the format).. ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: Formatting and scanning paths containing spaces
    ... If you can ensure that you have complete control of this file, ... can put the "fields" of the record into a list and write the string ... I don't have complete control of the file format, ... with [array get]. ...
    (comp.lang.tcl)
  • Re: Date format detection
    ... Specifies the locale for which the date string is to be formatted. ... date format for this locale. ... the system default-date format for the specified locale. ... be enclosed within single quotation marks in the date format picture. ...
    (borland.public.delphi.thirdpartytools.general)
  • Re: Keeping Contents of a Text Box
    ... ..Enable property to False) the control. ... The Format() function can simplify concatenations. ... Private Declare Sub GetSystemTime Lib "Kernel32" (lpSystemTime As ... Dim strBuffer As String, lng As Long, strSystemTime As String ...
    (comp.databases.ms-access)
  • Re: CDate problem
    ... It s always a good idea to get the regionalsetting for the date ... dim sFormat as string, sDate as string ... 'Format a date ... added a calendar control to the form and all the dates are now formatted to ...
    (microsoft.public.vb.general.discussion)