Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.forth > #13123

Re: Using a wid for formatting.

Newsgroups comp.lang.forth
From Albert van der Horst <albert@spenarnc.xs4all.nl>
Subject Re: Using a wid for formatting.
Date 2012-06-21 08:45 +0000
Message-ID <m5ylns.3mp@spenarnc.xs4all.nl> (permalink)
Organization Dutch Forth Workshop
References <m5x1zt.hm5@spenarnc.xs4all.nl> <8b21be3c-8bbe-4b89-a3ef-56322b9f37e6@j25g2000yqn.googlegroups.com>

Show all headers | View raw


In article <8b21be3c-8bbe-4b89-a3ef-56322b9f37e6@j25g2000yqn.googlegroups.com>,
Pablo Hugo Reda  <pabloreda@gmail.com> wrote:
>Albert:
>
>I implement format string, I do things like
>
>dup "tos=%d" print cr
>
>or
>
>"hi" 3.4 "value=%f str=%s" mprint | to memory
>
>one problem I have with this is when need a double print (format
>string)
>
>23 "hvalue=%h" mprint "result=%s" print

>
>when deal with database is usual and only I fix in the first parameter
>mprint work in the first free memory and discart later and I check if
>the first parameter is the memory work and then I use other address.
>
>how you deal with this situation??

A
avoid

B
23 "hvalue=%h" mprint PAD $!
PAD $@ "result=%s" print

C
Beyond that, you will need the ALLOCATE wordset.

Groetjes Albert

--
-- 
Albert van der Horst, UTRECHT,THE NETHERLANDS
Economic growth -- being exponential -- ultimately falters.
albert@spe&ar&c.xs4all.nl &=n http://home.hccnet.nl/a.w.m.van.der.horst

Back to comp.lang.forth | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

Using a wid for formatting. Albert van der Horst <albert@spenarnc.xs4all.nl> - 2012-06-20 12:43 +0000
  Re: Using a wid for formatting. JennyB <jennybrien@googlemail.com> - 2012-06-20 15:38 -0700
  Re: Using a wid for formatting. Pablo Hugo Reda <pabloreda@gmail.com> - 2012-06-20 16:03 -0700
    Re: Using a wid for formatting. Albert van der Horst <albert@spenarnc.xs4all.nl> - 2012-06-21 08:45 +0000
      Re: Using a wid for formatting. Pablo Hugo Reda <pabloreda@gmail.com> - 2012-06-21 05:56 -0700
  Re: Using a wid for formatting. Krishna Myneni <krishna.myneni@ccreweb.org> - 2012-06-22 19:09 -0700

csiph-web